-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
51 lines (45 loc) · 1.18 KB
/
main.cpp
File metadata and controls
51 lines (45 loc) · 1.18 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
#include<iostream>
#include "/home/pradip-pun-magar/CSIT2ndsem/CPlus/AnotherClassHavingFile.cpp"
using namespace std;
void bookTicket(){
Reservation r;
r.inputDetails();
r.saveToFile();
}
void cancelTicket(){
Reservation r;
r.cancelTicket();
}
void viewReservations(){
Reservation r;
r.viewAll();
}
int main() {
int choice;
do{
cout<<"\n-----------------------Bus Reservation System-----------------------"<<endl;
cout<<"1. Book Ticket"<<endl;
cout<<"2. Cancel Ticket"<<endl;
cout<<"3. View All Reservations"<<endl;
cout<<"4. Exit\n\n"<<endl;
cout<<"Enter yours Choice(1 or 2 or 3 or 4) =";
cin>>choice;
switch(choice){
case 1:
bookTicket();
break;
case 2:
cancelTicket();
break;
case 3:
viewReservations();
break;
case 4:
cout<<"Exiting System. Bye Have a Nice Day :)\n\n\n";
break;
default:
cout<<"Invalid Choice Given. Plz Try again :)"<<endl;
}
}while(choice!=4);
return 0;
}