-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
51 lines (47 loc) · 2.23 KB
/
main.cpp
File metadata and controls
51 lines (47 loc) · 2.23 KB
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
//#include "../Receptionist.h"
#include "../rt.h"
#include "../Customer.h"
int main(void) {
cout << "-----------------------------------------------Calling Constructors------------------------------------------------------\n";
Customer Peter; // create an instance of a student called Fred
Recep Duke; // create an instance of a course
Tech Frank;
cout << "\n--------------------------------------------Test case start------------------------------------------------------\n";
Peter.initializetyre(1, 100);
Peter.initializetyre(2, 0);
Peter.initializetyre(3, 100);
Peter.initializetyre(4, 0);
Peter.initializeOF(100);
printf("Customer's Car condition: \nRemaining perscentage of Oil: %d old, \nRemaining perscentage of Air Filter: %d old.\nUsed perscentage of Oil Filter: %d old. \n", Peter.ShowOil(), Peter.ShowAirFilter(), Peter.ShowOilFilter());
Peter.Showty();
cout << "\nConnecting a receptionist...\n";
Peter.AddRecep(&Duke);
cout << "\nConnecting a technician..\n";
Duke.AddTech(&Frank);
cout << "Customer sends the car to the receptionist..\n";
Duke.getCar(Peter.sendCar());
cout << "Receptionist assigns the car to the technician...\n";
Frank.getCar(Duke.sendCar());
cout << "\nTechnician starts to check the car\n";
Frank.ServiceCar();
cout << "\nInception complete, Technician returns the car to the receptionist..\n";
Duke.getCar(Frank.sendCar());
cout << "\nReceptionist generate invoice and update service record..\n";
Duke.Generateinvoice(4);
Duke.ShowSR();
Duke.StampServiceRecord();
cout << "\nCalculate the total cost for this maintainance..\n";
Peter.Pay(Duke.SendPayment());
cout << "\nCustomer pays expense..\n";
Peter.Showmoney();
cout << "\nReceptionist returns the car..\n";
Peter.getCar(Duke.sendCar());
cout << "\nCustomer's car information after maintainance..\n";
printf("Now Car: \nRemaining Oil: %d \nRemaining AirFilter: %d \nUsed OilFilter: %d\n", Peter.ShowOil(), Peter.ShowAirFilter(), Peter.ShowOilFilter());
Peter.Showty();
cout << "\n--------------------------------------------Test case end------------------------------------------------------\n";
//////////////////////////////////// Unit Test
// Frank.updateindex(5);
//Frank.ServiceCar();
return 0;
};