-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
278 lines (271 loc) · 17.5 KB
/
Main.java
File metadata and controls
278 lines (271 loc) · 17.5 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
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
import Admin.*;
import Customer.*;
import Staff.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("===================================================================================================================================================================================================");
System.out.println("* *");
System.out.println("* WELCOME to Hotel LuxeLands *");
System.out.println("* *");
System.out.println("===================================================================================================================================================================================================");
System.out.println("===================================================================================================================================================================================================");
System.out.println("* *");
System.out.println("* 1. Customer *");
System.out.println("* 2. Admin *");
System.out.println("* 3. Staff *");
System.out.println("* *");
System.out.println("===================================================================================================================================================================================================");
int car = sc.nextInt();
while(true){
switch(car){
case 1:
ArrayList<Customer> cus =new ArrayList<>();
Customer newMember = null;
Home index = new Home();
index.Homepage();
System.out.print("Enter your choice: ");
int n = sc.nextInt();
System.out.println("\n");
switch (n){
case 1:
newMember = new NewCustomer();
newMember.set_info();
cus.add(newMember);
newMember.get_info();
index.Amenities();
index.HotelInfo();
// main(args);
break;
case 2:
HotelC Indore = new HotelC();
Indore.Amenities();
Indore.HotelInfo();
Indore.setRooms();
System.out.println("===================================================================================================================================================================================================");
System.out.println("* *");
System.out.println("* 1. Book Room 2. Check-out 3. Display Available Rooms *");
System.out.println("* *");
System.out.println("===================================================================================================================================================================================================");
System.out.print("\n" + "Enter your choice: ");
int roomCheck = sc.nextInt();
System.out.println();
switch(roomCheck){
case 1:
Indore.Tariff();
int roomType = sc.nextInt();
System.out.println("\n");
// Indore.BookRoom(n);
switch(roomType){
case 1:
Indore.Bill("Deluxe Room", 4100);
break;
case 2:
Indore.Bill("Executive Deluxe Room", 6400);
break;
case 3:
Indore.Bill("Presidential Suite Room", 12000);
break;
default:
System.out.println("Invalid Input");
// main(args);
break;
}
System.out.println("Enter Your Information: " + "\n");
newMember = new NewCustomer();
newMember.set_info();
cus.add(newMember);
newMember.get_info();
Indore.BookRoom(n);
System.out.println("Room Successfully Booked" + "\n");
break;
case 2:
System.out.print("Enter your room number: ");
int roomNo = sc.nextInt();
Indore.checkOut(roomNo);
break;
default:
Indore.displayAvailableRoom();
break;
}
break;
case 3:
Restaurant res = new Restaurant();
res.Menu();
int ch = sc.nextInt();
break;
case 4:
Banquet hall = new Banquet();
break;
case 5:
Deals d = new Deals();
d.RoomDeals();
d.Dining();
break;
case 6:
System.out.println("Get answers to your questions or give feedback, however you like to get in touch and wherever you are in the world. Choose from email or phone we'll help you direct your inquiries to the right " + "\n" +
"place, quickly and easily. For hotel reservations, call 89892 47785.");
System.out.println("Location: 111, Vijay Nagar, Indore, Madhya Pradesh 452001" + "\n\n" + "Email: parthgupta00100@luxeland.com" + "\n\n" + "Inn Keeper's Cell: 84585 56845");
break;
case 7:
System.exit(0);
break;
default:
System.out.println("Invalid Input");
break;
}
break;
case 2:
Hotel_Indore h = new Hotel_Indore();
Hotel_Indore_Staff his = new Hotel_Indore_Staff();
System.out.println("**********************************************************");
System.out.println("* WELCOME TO THE DASHBOARD *");
System.out.println("**********************************************************");
System.out.println("* 1.) Room Management *");
System.out.println("* 2.) Staff Management *");
System.out.println("* 3.) Finance Management *");
System.out.println("* 4.) Live Status Section *");
System.out.println("* 5.) Customer Information *");
System.out.println("* 6.) Exit *");
System.out.println("**********************************************************");
int chosenOption = sc.nextInt();
switch (chosenOption) {
case 1: {
System.out.println("\nWelcome to Room Management Section");
System.out.println("1.) Add Room");
System.out.println("2.) Update Room Details");
System.out.println("3.) View Room Information");
int roomOption = sc.nextInt();
switch (roomOption) {
case 1: {
System.out.print("\nEnter your Room Type(Suite,Club_Grande,Other):\n");
String roomType = sc.next();
h.add_room(roomType);
System.out.println("Added Room Successfully");
h.display(h.room_count - 1);
break;
}
case 2: {
System.out.print("\nEnter the Room Number to update:\n");
int roomNumber =0;
try{roomNumber = sc.nextInt();}
catch(InputMismatchException ie)
{
System.out.println("Entered Invalid Input.Enter Again");
}
System.out.println("\nWant to update price or without price:\n1.)With Price\n2.)Without Price");
int choice = sc.nextInt();
if (choice == 1) {
System.out.println("Enter New Room Type");
String new_room_type = sc.next();
System.out.println("Enter New Room Price");
float price = sc.nextFloat();
h.update_room_details(new_room_type, price, roomNumber);
} else {
System.out.println("Enter New Room Type");
String new_room_type = sc.next();
h.update_room_details(new_room_type, roomNumber);
}
h.display(roomNumber);
System.out.println("Room details updated successfully");
break;
}
case 3: {
System.out.println("Enter Room Number to view details:");
int roomNumber = sc.nextInt();
h.view_room_details(roomNumber);
break;
}
}
break;
}
case 2: {
System.out.println("\nWelcome to Staff Management Section");
System.out.println("1.) Add Staff");
System.out.println("2.) Update Staff Details");
System.out.println("3.) Remove Staff");
int staffOption = sc.nextInt();
switch (staffOption) {
case 1: {
System.out.print("\nEnter Staff Name:\n");
String name = sc.next();
System.out.print("\nEnter Staff Position:\n");
String position = sc.next();
his.add_staff(name, position);
System.out.println("Added Staff Successfully");
break;
}
case 2: {
System.out.print("\nEnter the Staff Name to update:\n");
String name = sc.next();
System.out.print("\nEnter new position for the staff:\n");
String newPost = sc.next();
his.update_staff_details(name, newPost);
System.out.println("Staff details updated successfully");
break;
}
case 3: {
System.out.print("\nEnter the Staff Name to remove:\n");
String name = sc.next();
his.delete_staff(name);
System.out.println("Staff removed successfully");
break;
}
}
break;
}
case 3:
{
}
case 6: {
System.out.println("Thank You For Using Service");
sc.close();
return;
}
default:
System.out.println("Invalid option.");
}
case 3:
ArrayList<Staff> arr = new ArrayList<>();
System.out.print("Enter filename for staff records: ");
String filename = sc.nextLine();
System.out.println("Enter Staff Type (1-Manager, 2-Receptionist, 3-Chef, 4-Worker, 5-Show All, 6-Exit ): ");
int choice = sc.nextInt();
sc.nextLine();
if (choice == 6) break;
Staff staffMember = null;
switch (choice) {
case 1:
staffMember = new Manager();
break;
case 2:
staffMember = new Receptionist();
break;
case 3:
staffMember = new Chef();
break;
case 4:
staffMember = new Worker();
break;
case 5:
System.out.println("\n Staff Details :");
for (Staff staff : arr) {
staff.showDetails();
System.out.println("-------------------------");
}
continue;
default:
System.out.println("Invalid choice");
continue;
}
staffMember.inputDetails();
arr.add(staffMember);
break;
default:
System.out.println("Invalid Input");
break;
}
}
}
}