-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainten_part.cpp
102 lines (96 loc) · 1.89 KB
/
mainten_part.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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// function att_set
#include <iostream>
#include <string.h>
#include "payment.cpp"
using namespace std;
class Parts
{
private:
string name, brand, status;
int cost;
public:
void Set_status(int n)
{
if (n == 0)
{
status = "Not Available";
}
else
{
status = "Available";
}
}
int ret_cost()
{
return cost;
}
void att_set(string st1, string st2, int a)
{
status = "Available";
name = st1;
brand = st2;
cost = a;
// call payment
}
Parts(/* args */);
~Parts();
};
Parts::Parts(/* args */)
{
}
Parts::~Parts()
{
}
class Maintenance
{
private:
int charge, days;
string complain;
Parts part_req;
Payment obj;
public:
void Set_complain(string st)
{
complain = st;
}
void part_select()
{
string s1, s2;
int cost;
cout << "Enter the name of part ";
cin >> s1;
cout << "Enter the brand of part ";
cin >> s2;
cout << "Enter the cost of part ";
cin >> cost;
part_req.att_set(s1, s2, cost);
// user se attribute lena hai.
// pament call karna hjai
}
void Check_damage(string name)
{
int n;
cout << "Enter no. of days required ";
cin >> n;
days = n;
cout << "Enter maintenance charge per day ";
cin >> n;
charge = n * days;
part_select();
charge = charge + part_req.ret_cost();
// add part cost to charge
obj.payment_info( name ,charge);
}
int Maintenance_cost()
{
return charge;
}
Maintenance(/* args */);
~Maintenance();
};
Maintenance::Maintenance(/* args */)
{
}
Maintenance::~Maintenance()
{
}