forked from benjyberk/ADP-ex4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDriver.h
49 lines (43 loc) · 1.07 KB
/
Driver.h
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
//
// Benjy Berkowicz - 336182589
// Advanced Programming 2016-2017 Bar Ilan
//
#ifndef ADVANCED_EX2_DRIVER_H
#define ADVANCED_EX2_DRIVER_H
class Taxi;
class DriverLocationListener;
#include <cstdlib>
#include <vector>
#include "MaritalStatus.h"
#include "Taxi.h"
#include "DriverLocationListener.h"
#include "TripInfo.h"
/**
* The driver is essentially a container class for information. His only (cureent)
* method of note is add listener - which simply adds a listener
*/
class Driver {
private:
int id;
int age;
MaritalStatus maritalStatus;
int yearsExperience;
int averageSatisfaction;
int passengers;
int carID;
Taxi* taxi;
std::vector<DriverLocationListener *> observers;
public:
Driver(int, int, MaritalStatus, int, int);
int getID();
int getAge();
MaritalStatus getMarital();
Taxi* getTaxi();
int getSatisfaction();
int getYears();
void setTaxi(Taxi*);
void notifyListeners();
// Add a listener for the driver position
void addListener(DriverLocationListener *);
};
#endif //ADVANCED_EX2_DRIVER_H