-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCarpentry.h
More file actions
108 lines (77 loc) · 2.37 KB
/
Copy pathCarpentry.h
File metadata and controls
108 lines (77 loc) · 2.37 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
using namespace std;
#define labour 60
char choice;
char order;
unsigned short CustomerNo = 0;
unsigned short CurrentOrders = 0;
class menu{
public:
void print ();
void printTopOrBottom (char, char);
void printLine (string);
bool validate (char);
}mainMenu;
class customer{//Base class customer
protected:
string name, address, phone;
unsigned short custNo, orderNo;
public:
void getCustomerDetails();
void printCustomerDetails();
};
class furniture: public customer{
protected:
string paint, varnish;
float vat, cost, totalCost, net, assets, area;
unsigned short numLegs;
public:
furniture(){numLegs = 0;};
string itemDetail;
void CalcCost(){cost = area * 15 + numLegs * 20 + area * 2 + numLegs + labour; vat = cost * .21; totalCost = vat + cost; assets+= totalCost;};
void outputCost(){cout <<"\n\tCost\t\t"<< cost <<"\n\tvat @ 21%\t"<<vat << "\n\tTotal Cost\t"<<totalCost<<"\n\n";};
void printOrder();
void placeOrder();
void collectOrder();
bool valid (char);
void AllOrders();
void printAllOrders();
};
unsigned short SquarTables;
class SquarTable: virtual public furniture{//Class Square table will inherit form furniture
protected:
float length;
public:
void getSqTableDetails();
void CalcSqArea(){area = length * length;};
};//Square Array with five elements
class Stool: virtual public furniture {//Class stool will inherit from furniture
protected:
float radius, stoolBase;
public:
void getStoolDetails();
void CalcStArea(){area = 3.14 * (radius * radius) * (stoolBase);};
};
unsigned short StoolsCount = 0;
class RectTable: public SquarTable{
protected:
float width;
public:
void getRecTableDetails();
void CalcRectArea(){area = width * length;};
};
unsigned short plainTables = 0;
class bookShelf: public RectTable{
protected:
float height, side;
unsigned short shelves;
public:
void getBookDetails();
void CalcBkArea(){area = (height * width) + (side * height * 2) + width * side * shelves;};
};
unsigned short bookShelves = 0;
class CurvDiningTable: public bookShelf, public Stool{
public:
// radius = width / 2;
void CalcCurvArea(){area = (length * width) + 3.14 * ((width/2) * (width/2));};
};
unsigned short CurvedTables = 0;