-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
88 lines (82 loc) · 2.37 KB
/
main.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
#include "room.h"
#include "customer.h"
#include "reservation.h"
#include "hotelManagement.h"
int main(){
HotelManagement hotel(10); //hotel with 10 rooms
int choice;
do
{
cout << "\n\n************ Hotel Management System ************\n";
cout << "1. Add Customer\n";
cout << "2. Make Reservation\n";
cout << "3. Check Room Availability\n";
cout << "4. View All Customers\n";
cout << "5. View All Reservations\n";
cout << "6. Cancel Reservation\n";
cout << "0. Exit\n";
cout << "Enter your choice: ";
cin >> choice;
switch (choice)
{
case 1:{
cout << "\n1. Add Customer\n\n";
string name, contact;
int id;
cout << "Enter Customer Name: ";
cin >> name;
cout << "Enter Contact Info: ";
cin >> contact;
cout << "Create Customer ID: ";
cin >> id;
hotel.addCustomer(id, name, contact);
break;
}
case 2:{
cout << "\n2. Make Reservation\n\n";
int roomNum, id;
string checkin, checkout;
cout<< "Enter the Customer ID: ";
cin >> id;
cout << "Enter Room Number: ";
cin >> roomNum;
cout << "Enter Check-in-Date: ";
cin >> checkin;
cout << "Enter Check-out-Date: ";
cin >> checkout;
hotel.makeReservation(roomNum,checkin,checkout,id);
break;
}
case 3: {
cout << "\n3. Check Room Availability\n\n";
hotel.checkRoomAvailability();
break;
}
case 4: {
cout << "\n4. View All Customers\n\n";
hotel.viewCustomer();
break;
}
case 5: {
cout << "\n5. View All Reservations\n\n";
hotel.viewReservations();
break;
}
case 6: {
cout << "\n6. Cancel Reservation\n\n";
int reservationId;
cout << "Enter Reservation ID: ";
cin >> reservationId;
hotel.cancelReservation(reservationId);
break;
}
case 0:{
cout << "Exiting...\n";
break;
}
default:
break;
}
} while (choice != 0);
return 0;
}