-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReceptionist.h
More file actions
85 lines (69 loc) · 1.62 KB
/
Receptionist.h
File metadata and controls
85 lines (69 loc) · 1.62 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef __Recep__
#define __Recep__
#include "rt.h"
#include "Technician.h"
#include "Car.h"
#define AF 1
#define OI 2
#define OF 3
#define TY 4
class Customer;
class Recep {
private:
Car* RecepCar;
int TotalPayment;
public:
class Customer* theCustomer;
class Tech* theTech;
void AddTech(Tech* aTech)
{
theTech = aTech;
theTech->theRecep = this;
}
void getCar(Car* car) {
RecepCar = car;
}
Car* sendCar(void) {
return RecepCar;
}
int ShowInvoice(void) {
return RecepCar->showInvoice();
}
void ShowSR(void) {
RecepCar->showSR();
}
void Generateinvoice(int x) {
RecepCar->updateinvoice(x);
}
void StampServiceRecord(void) {
RecepCar->updateSR();
}
int SendPayment(void) {
for (int i = 1; i < 5; i++) {
if (i == AF) {
TotalPayment = TotalPayment + 10*RecepCar->ShowJS(i);
printf("Air Filter has been changed. Cost is %d.\n", 10 * RecepCar->ShowJS(i));
}
if (i == OI) {
TotalPayment = TotalPayment + 20 * RecepCar->ShowJS(i);
printf("Oil has been changed. Cost is %d.\n", 20 * RecepCar->ShowJS(i));
}
if (i == OF) {
TotalPayment = TotalPayment + 30 * RecepCar->ShowJS(i);
printf("Oil Filter has been changed. Cost is %d.\n", 30 * RecepCar->ShowJS(i));
}
if (i == TY) {
TotalPayment = TotalPayment + 40 * RecepCar->ShowJS(i);
printf("Tyre has been changed. Cost is %d.\n", 40 * RecepCar->ShowJS(i));
}
}
printf("Total Payment is: %d\n", TotalPayment);
return TotalPayment;
}
Recep();
};
Recep::Recep() {
TotalPayment = 0;
cout << "Receptionist Constuctor being called..\n";
}
#endif