-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vehicle.h
46 lines (37 loc) · 671 Bytes
/
Vehicle.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
#include "Enums.h"
#include <string>
class ParkingTicket;
class Vehicle
{
public:
bool assignTicket(ParkingTicket ticket);
private:
std::string m_licenseNumber;
VehicleType m_type;
ParkingTicket m_ticket;
};
class Car : public Vehicle
{
public:
Car() : Vehicle(VehicleType::CAR){}
};
class Van : public Vehicle
{
public:
Van() : Vehicle(VehicleType::VAN){}
};
class Truck: public Vehicle
{
public:
Truck() : Vehicle(VehicleType::TRUCK){}
};
class Electric : public Vehicle
{
public:
Electric() : Vehicle(VehicleType::ELECTRIC){}
};
class MotorBike : public Vehicle
{
public:
MotorBike() : Vehicle(VehicleType::MOTORBIKE){}
};