-
Notifications
You must be signed in to change notification settings - Fork 1
/
Trip.java
41 lines (34 loc) · 904 Bytes
/
Trip.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
public class Trip {
private String originPixel;
private String destinationPixel;
private double departTime;
private double arriveTime;
private double returnTime;
private int tripSize;
public Trip(String pixel, double dTime, String pixel2, double eTime, double distance, int size) {
originPixel = pixel;
destinationPixel = pixel2;
tripSize = size;
departTime = dTime;
arriveTime = eTime;
returnTime = arriveTime + (1.2 * distance * 3600 / 30) + 600; // returns after 10 minutes and takes however long it took to get to the other pixel to get back
}
public double departTime() {
return departTime;
}
public int size() {
return tripSize;
}
public String originPixel() {
return originPixel;
}
public String destinationPixel() {
return destinationPixel;
}
public double returnTime() {
return returnTime;
}
public double arriveTime() {
return arriveTime;
}
}