-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaxi.cpp
68 lines (50 loc) · 1006 Bytes
/
Taxi.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
64
65
66
67
68
//
// Benjy Berkowicz - 336182589
// Advanced Programming 2016-2017 Bar Ilan
//
#include "Taxi.h"
using namespace std;
Taxi::Taxi(int newId, CarMaker manu, Color newCol) {
id = newId;
color = newCol;
manufacturer = manu;
isAssigned = false;
}
Color Taxi::getColor() {
return color;
}
CarMaker Taxi::getManufacturer() {
return manufacturer;
}
int Taxi::getOdom() {
return odometer;
}
int Taxi::getID() {
return id;
}
int Taxi::getPrice() {
return tariff;
}
Passenger *Taxi::getPassenger() {
return 0;
}
void Taxi::setPassenger(Passenger) {
}
void Taxi::addListener(Listener *) {
}
void Taxi::removeListener(Listener *) {
}
void Taxi::setLocation(Point * newPoint) {
location = newPoint;
}
void Taxi::setDriver(Driver * newDriver) {
driver = newDriver;
}
void Taxi::assignTrip(TripInfo assign) {
currentTrip = assign;
upto = assign.getRoute()->size() - 2;
isAssigned = true;
}
Point * Taxi::getLocation() {
return location;
}