forked from azram19/IC-PL---CPP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vehicleMain.cpp
57 lines (39 loc) · 1.24 KB
/
vehicleMain.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
#include <iostream>
#include "vehicle.hpp"
#include "bus.hpp"
#include "lorry.hpp"
#include "dieselCar.hpp"
#include "petrolCar.hpp"
using namespace std;
//
// Do not alter the main() function below.
//
int main () {
cout << "====================================" << endl;
cout << "Vehicle charging system operational!" << endl;
cout << "====================================" << endl;
Lorry lorry ( "L10RRY", 12 );
Bus tessa ( "T3SSA" );
tessa.board ( 10 );
lorry.enter ( Date(2,10,2011), 10 );
Vehicle::set_rate ( 2.00 );
DieselCar::set_limit ( 10 );
tessa.enter ( Date(2,10,2011), 11 );
tessa.leave ( 5 );
tessa.enter ( Date(2,10,2011), 13 );
PetrolCar milly ( "M1LLY" );
DieselCar vanilli ( "V4NLI", 15 );
milly.enter ( Date(2,10,2011), 16 );
vanilli.enter ( Date(2,10,2011), 17 );
Vehicle::set_rate ( 2.50 );
vanilli.enter ( Date(3,10,2011), 2 );
tessa.board ( 20 );
tessa.enter ( Date(3,10,2011), 14 );
DieselCar::set_limit ( 20 );
vanilli.enter ( Date(01,01,2012), 10 );
lorry.enter ( Date(01,01,2012), 11 );
cout << "=====================================" << endl;
cout << "Vehicle charging system powered down!" << endl;
cout << "=====================================" << endl;
return 0;
}