forked from Yash-Raj-Singh/2nd_sem_oops_files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcinema.cpp
66 lines (48 loc) · 1.15 KB
/
cinema.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
#include <iostream>
#include <string>
using namespace std;
class cinema
{
public:
string movie1 = "TITANIC";
string movie2 = "SPY WORLD";
string movie3 = "JOHN WICK";
void firstmovie()
{
cout<<"Available Timing For This Movie Are : "<<endl<<endl<<"1. 10:30 a.m."<<endl<<"2. 14:30 p.m."<<endl<<"3. 19:00 p.m."<<endl;
}
void secondmovie()
{
cout<<"Available Timing For This Movie Are : "<<endl<<endl<<"1. 08:30 a.m."<<endl<<"2. 13:00 p.m."<<endl<<"3. 18:30 p.m."<<endl;
}
void thirdmovie()
{
cout<<"Available Timing For This Movie Are : "<<endl<<endl<<"1. 11:30 a.m."<<endl<<"2. 16:00 p.m."<<endl<<"3. 23:30 p.m."<<endl;
}
};
int main()
{
int a;
cinema M1, M2, M3;
cout<<" Available Movies Are : "<<endl<<"1. TITANIC"<<endl<<"2. SPY WORLD"<<endl<<"3. JOHN WICK"<<endl<<endl<<endl<<endl;
cout<<" Select The Movie Number Here : "<<endl<<endl;
cin>>a;
cout<<endl;
if(a == 1)
{
M1.firstmovie();
}
else if(a == 2)
{
M2.secondmovie();
}
else if(a == 3)
{
M3.thirdmovie();
}
else
{
cout<<"Error !"<<endl;
}
return 0;
}