forked from benjyberk/ADP-ex4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTripInfo.cpp
64 lines (47 loc) · 1.01 KB
/
TripInfo.cpp
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// Benjy Berkowicz - 336182589
// Advanced Programming 2016-2017 Bar Ilan
//
#include "TripInfo.h"
using namespace std;
TripInfo::TripInfo(int r_id, Point r_sPoint, Point r_dPoint, int r_numPass, int r_tar, int sTime) {
rideID = r_id;
startPoint = r_sPoint;
endPoint = r_dPoint;
numPassengers = r_numPass;
tarrif = r_tar;
startTime = sTime;
}
TripInfo::TripInfo() {
rideID = 0;
startPoint = Point();
endPoint = Point();
numPassengers = 0;
tarrif = 0;
startTime = -1;
}
void TripInfo::updateMeter(int) {
}
void TripInfo::changeEndPoint(Point) {
}
int TripInfo::getRideID() {
return rideID;
}
int TripInfo::getCurrentDistance() {
return 0;
}
Point TripInfo::getStartPoint() {
return startPoint;
}
Point TripInfo::getEndPoint() {
return endPoint;
}
void TripInfo::assignRoute(std::stack<Point>* assignedRoute) {
route = assignedRoute;
}
std::stack<Point>* TripInfo::getRoute() {
return route;
}
int TripInfo::getStartTime() {
return startTime;
}