-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hotel_Management.cpp
185 lines (161 loc) · 6.32 KB
/
Hotel_Management.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
#include <iostream>
using namespace std;
int main()
{
int quantity, choice;
// Quantity of Items
int Qrooms = 0, Qpasta = 0, Qcoffee = 0, Qburger = 0, Qshake = 0, Qnoodles = 0, Qchicken = 0;
// Sold Items
int Srooms = 0, Spasta = 0, Scoffee = 0, Sburger = 0, Sshake = 0, Snoodles = 0, Schicken = 0;
// Total Items
int Total_rooms = 0, Total_pasta = 0, Total_coffee = 0, Total_burger = 0, Total_shake = 0, Total_noodles = 0, Total_chicken = 0;
cout << "\n\tQuantity of Items we have";
cout << "\nRooms available: ";
cin >> Qrooms;
cout << "\nQuantity of pasta: ";
cin >> Qpasta;
cout << "\nQuantity of coffee: ";
cin >> Qcoffee;
cout << "\nQuantity of burger: ";
cin >> Qburger;
cout << "\nQuantity of shake: ";
cin >> Qshake;
cout << "\nQuantity of noodles: ";
cin >> Qnoodles;
cout << "\nQuantity of chicken: ";
cin >> Qchicken;
m:
cout << "\n\t\t Please select from the menu options " << endl;
cout << "\n1) Rooms";
cout << "\n2) Pasta";
cout << "\n3) Coffee";
cout << "\n4) Burger";
cout << "\n5) Shake";
cout << "\n6) Noodles";
cout << "\n7) Chicken-Rolls";
cout << "\n8) Info of Sales & Collection ";
cout << "\n9) Exit ";
cout << "\n\n Please Enter your choice! ";
cin >> choice;
switch (choice)
{
case 1:
cout << "\n\nEnter the numbers of rooms you want: ";
cin >> quantity;
if (Qrooms - Srooms >= quantity)
{
Srooms += quantity;
Total_rooms += (quantity * 1200);
cout << "\n\n\t\t" << quantity << "rooms have been alloted to you.";
}
else
cout << "\n\tOnly " << Qrooms - Srooms << "Rooms are remaining in hotel";
break;
case 2:
cout << "\n\nEnter pasta quantity: ";
cin >> quantity;
if (Qpasta - Spasta >= quantity)
{
Spasta += quantity;
Total_pasta += (quantity * 250);
cout << "\n\n\t\t" << quantity << "pasta is the order.";
}
else
cout << "\n\tOnly " << Qpasta - Spasta << "pasta remaining in hotel";
break;
case 3:
cout << "\n\nEnter coffee quantity: ";
cin >> quantity;
if (Qcoffee - Scoffee >= quantity)
{
Scoffee += quantity;
Total_coffee += (quantity * 120);
cout << "\n\n\t\t" << quantity << "coffee is the order.";
}
else
cout << "\n\tOnly " << Qcoffee - Scoffee << "coffee remaining in hotel";
break;
case 4:
cout << "\n\nEnter burger quantity: ";
cin >> quantity;
if (Qburger - Sburger >= quantity)
{
Sburger += quantity;
Total_burger += (quantity * 120);
cout << "\n\n\t\t" << quantity << "burger is the order.";
}
else
cout << "\n\tOnly " << Qburger - Sburger << "burger remaining in hotel";
break;
case 5:
cout << "\n\nEnter shake quantity: ";
cin >> quantity;
if (Qshake - Sshake >= quantity)
{
Sshake += quantity;
Total_shake += (quantity * 150);
cout << "\n\n\t\t" << quantity << "shake is the order.";
}
else
cout << "\n\tOnly " << Qshake - Sshake << "shake remaining in hotel";
break;
case 6:
cout << "\n\nEnter noodles quantity: ";
cin >> quantity;
if (Qnoodles - Snoodles >= quantity)
{
Snoodles += quantity;
Total_noodles += (quantity * 250);
cout << "\n\n\t\t" << quantity << "noodles is the order.";
}
else
cout << "\n\tOnly " << Qnoodles - Snoodles << "noodles remaining in hotel";
break;
case 7:
cout << "\n\nEnter chicken-rolls quantity: ";
cin >> quantity;
if (Qchicken - Schicken >= quantity)
{
Schicken += quantity;
Total_chicken += (quantity * 300);
cout << "\n\n\t\t" << quantity << "chicken-rolls is the order.";
}
else
cout << "\n\tOnly " << Qchicken - Schicken << "chicken-rolls remaining in hotel";
break;
case 8:
cout << "\n\t\tDetails of Sales and Collections";
cout << "\n\nNumbers of rooms we had: " << Qrooms;
cout << "\nNumbers of rooms we gave for rent: " << Srooms;
cout << "\nRemaining rooms: " << Qrooms - Srooms;
cout << "\nTotal rooms collection for the day: " << Total_rooms;
cout << "\n\nNumbers of coffee we had: " << Qcoffee;
cout << "\nNumbers of coffee we gave for rent: " << Scoffee;
cout << "\nRemaining coffee: " << Qcoffee - Scoffee;
cout << "\nTotal coffee collection for the day: " << Total_coffee;
cout << "\n\nNumbers of burger we had: " << Qburger;
cout << "\nNumbers of burger we gave for rent: " << Sburger;
cout << "\nRemaining burger: " << Qburger - Sburger;
cout << "\nTotal burger collection for the day: " << Total_burger;
cout << "\n\nNumbers of shake we had: " << Qshake;
cout << "\nNumbers of shake we gave for rent: " << Sshake;
cout << "\nRemaining shake: " << Qshake - Sshake;
cout << "\nTotal shake collection for the day: " << Total_shake;
cout << "\n\nNumbers of noodles we had: " << Qnoodles;
cout << "\nNumbers of noodles we gave for rent: " << Snoodles;
cout << "\nRemaining noodles: " << Qnoodles - Snoodles;
cout << "\nTotal noodles collection for the day: " << Total_noodles;
cout << "\n\nNumbers of chicken-rolls we had: " << Qchicken;
cout << "\nNumbers of chicken-rolls we gave for rent: " << Schicken;
cout << "\nRemaining chicken-rolls: " << Qchicken - Schicken;
cout << "\nTotal chicken-rolls collection for the day: " << Total_chicken;
cout << "\n\n\nTotal collection for the day: " << Total_rooms + Total_burger + Total_chicken + Total_coffee + Total_noodles + Total_shake + Total_pasta;
case 9:
exit(0);
default:
cout << "\nPlease select the numbers mentioned above!";
break;
}
goto m;
// return 0;
}