2019-20
ANURAG YADAV
XII ‘A’
MOVIE BOOKING SYSTEM
COMPUTER SCIENCE PROJECT
JAWAHAR
NAVODAYA
VIDYALAYA
KANPUR
DEHAT
CERTIFICATE
Thisishereby to certify that ,the originaland
genuine investigation work hasbeen carried
out to investigate about subject matterand
the relateddata collection and
investigations hasbeen completed
solely ,sincerely and satisfactorily done by
ANURAG YADAV
astudentof classXII of theacademic
session 2019-20regardingthe
investigatoryprojectetitled
MOVIEBOOKING SYSTEM
InternalExaminer ExternalExaminer
……………………………………… ……………………………………
I would like to sincerely and profusely
thank my Computer science teacher
Mr.AMIR ALI SABRI for his able
guidance and vital support in
completing my project.
I also express my sincere thanks to my
classmates who extend helping hand in
completing this project
ANURAG YADAV
Class:-XII
Roll no:-23663420
1. acknoledgement
2. contents
3. programcode
4. outputs
5. references
Topic:- moviebookingsystem
theater
//Header Files
#include <iostream>
#include <fstream>
#include <conio.h>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <process.h>
#include <time.h>
using namespacestd;
class ticket{
public:
char name[10];
char cno[10];
} t; //object definition for ticket
// Class definition for card
class card : public ticket{ //inheritence for public ticket
public:
char address[50];
char emailid[20];
} v;
//object definition for card
//PrototypeCall for the functionsdefinitions.
void pay(int);
void random();
void card();
//Main function
int main(){
system("CLS");
//Integer Declaration
int ent, a, b, N, x, cardid;
char ans;
//To display the system time.
//Using time header file
{time_t t = time(NULL);
tm* timePtr = localtime(&t);
cout << "Time of the computer presently:";
cout << "seconds= " << timePtr->tm_sec << endl;
cout << "minutes = " << timePtr->tm_min << endl;
cout << "hours= " << timePtr->tm_hour << endl;
cout << "day of month = " << timePtr->tm_mday<< endl;
cout << "month of year = " << timePtr->tm_mon << endl;
cout << "year = " << timePtr->tm_year + 1900 << endl;
cout << "weekday = " << timePtr->tm_wday << endl;
cout << "day of year = " << timePtr->tm_yday<< endl;
cout << "daylightsavings = " << timePtr->tm_isdst << endl;
}
//An exit controlled loop (Do...While)
do{
//Menu
cout<<"nttt ----------------------------------";
cout<<"nttt SimpleMovie Ticket Booking System";
cout<<"nttt ----------------------------------";
cout<<"ntttt WelcomeCustomer!";
//Menu for the user
cout<<"nntttt<1> Movie Timings";
cout<<"ntttt <2> Recieving Ticket";
cout<<"ntttt <3> For Information";
cout<<"ntttt <4> DTCard Registration";
cout<<"ntttt <5> Exit nn";
cout<<"ttttEnter Your Choice :"<<"t";
cin>>ent;
switch(ent)
{ //Movie Titles
case 1:
system("CLS");
cout<<"nnttttTheShowsare :";
cout<<"nntttt1. Avengers: InfinityWar";
cout<<"nntttt2. Antman And The Wasp";
cout<<"nntttt3. Deadpool2";
cout<<"nntttt4. Venom";
cout<<"nntttt5. Captain Marveln";
cout<<"nttttEnter Your Choice :"<<"t";
cin>>a;
cout<<"nnttttThe Timings for the selected show are:";
switch(a)
{ case 1:
system("CLS");
cout<<"nnttttSelect the the timings: ";
cout<<"ntttt 1. 0800";
cout<<"ntttt 2. 1300";
cout<<"ntttt 3. 1450";
cout<<"ntttt 4. 1800";
cout<<"ntttt 5. 2100";
cout<<"ntttt 6. 0100 n";
//Timingsof the show
cout<<"nnttttPlease select the timings: ";
cin>>b;
cout<<"nnttttEnter your name: ";
cin>>t.name;
cout<<"nnttttEnter your contact number: ";
cin>>t.cno;
cout<<"nnttttEnter the number of tickets you
want to purchase: ";
int x;
cin>>x;
pay(x);
cout<<"nnnttttYour ticket is here: ";
cout<<"ntttt Name :"<<t.name;
cout<<"ntttt ContactNo :"<<t.cno;
cout<<"ntttt Showtimings :";
switch(b)
{ case 1: cout<<"0800";
break;
case 2: cout<<"1300";
break;
case 3: cout<<"1450";
break;
case 4: cout<<"1800";
break;
case 5: cout<<"2100";
break;
case 6: cout<<"0100";
break;
}
cout<<"nnttttDo you want to choose
another option(y/n)";
cin>>ans;
system("CLS");
break;
case 2: system("CLS");
cout<<"nnttttSelectthe the timings:";
cout<<"ntttt 1. 0900";
cout<<"ntttt 2. 1100";
cout<<"ntttt 3. 1250";
cout<<"ntttt 4. 1500";
cout<<"ntttt 5. 2000";
cout<<"ntttt 6. 2200";
cout<<"ntttt Please select the timings: ";
cin>>b;
cout<<"nnttttEnter your name: ";
cin>>t.name;
cout<<"ntttt Enter your contactnumber: ";
cin>>t.cno;
cout<<"ntttt Enter the number of tickets you
want to purchase: ";
cin>>x;
pay(x);
cout<<"nnttttYour ticket is here:";
cout<<"ntttt Name :"<<t.name;
cout<<"ntttt ContactNo :"<<t.cno;
cout<<"nttttShowtimings :";
switch(b)
{ case 1: cout<<"0800";
break;
case 2: cout<<"1300";
break;
case 3: cout<<"1450";
break;
case 4: cout<<"1800";
break;
case 5: cout<<"2100";
break;
case 6: cout<<"0100";
break;
}
cout<<"nnttttDo you want to choose another
option(y/n)";
cin>>ans;
system("CLS");
break;
case 3: system("CLS");
cout<<"nnttttSelectthe the timings:";
cout<<"ntttt 1. 0800";
cout<<"ntttt 2. 1300";
cout<<"ntttt 3. 1450";
cout<<"ntttt 4. 1800";
cout<<"ntttt 5. 2100";
cout<<"ntttt 6. 0100";
cout<<"ntttt Please select the timings";
cin>>b;
cout<<"ntttt Enter your name: ";
cin>>t.name;
cout<<"ntttt Enter your contactnumber: ";
cin>>t.cno;
cout<<"nttttEnter the number of tickets you
want to purchase: ";
cin>>x;
pay(x);
cout<<"nnttttYour ticket is here: ";
cout<<"ntttt Name :"<<t.name;
cout<<"ntttt ContactNo :"<<t.cno;
cout<<"ntttt Showtimings :";
switch(b)
{ case 1: cout<<"0900";
break;
case 2: cout<<"1300";
break;
case 3: cout<<"1450";
break;
case 4: cout<<"1800";
break;
case 5: cout<<"2100";
break;
case 6: cout<<"0100";
break;
}
cout<<"nnttttDo you want to choose another
option(y/n)";
cin>>ans;
system("CLS");
break;
case 4: system("CLS");
cout<<"nnttttSelectthe the timings: ";
cout<<"ntttt 1. 0800";
cout<<"ntttt 2. 1300";
cout<<"ntttt 3. 1450";
cout<<"ntttt 4. 1800";
cout<<"ntttt 5. 2100";
cout<<"ntttt 6. 0100";
cout<<"ntttt Please select the timings: ";
cin>>b;
cout<<"ntttt Enter your name: ";
cin>>t.name;
cout<<"ntttt Enter your contactnumber: ";
cin>>t.cno;
cout<<"ntttt Enter the number of tickets you
want to purchase: ";
cin>>x;
pay(x);
cout<<"nnttttYour ticket is here: ";
cout<<"ntttt Name :"<<t.name;
cout<<"ntttt ContactNo :"<<t.cno;
cout<<"ntttt Showtimings :";
switch(b)
{ case 1: cout<<"0800";
break;
case 2: cout<<"1300";
break;
case 3: cout<<"1450";
break;
case 4: cout<<"1800";
break;
case 5: cout<<"2100";
break;
case 6: cout<<"0100";
break;
}
cout<<"nnttttDo you want to choose
another option(y/n)";
cin>>ans;
system("CLS");
break;
case 5:
system("CLS");
cout<<"nnttttSelectthe the timings:";
cout<<"ntttt 1. 0800";
cout<<"ntttt 2. 1300";
cout<<"ntttt 3. 1450";
cout<<"ntttt 4. 1800";
cout<<"ntttt 5. 2100";
cout<<"ntttt 6. 0100";
cout<<"ntttt Please select the timings: ";
cin>>b;
cout<<"ntttt Enter your name: ";
cin>>t.name;
cout<<"ntttt Enter your contactnumber: ";
cin>>t.cno;
cout<<"ntttt Enter the number of tickets you
want to purchase: ";
cin>>x;
pay(x);
cout<<"n nttttYour ticket is here: ";
cout<<"ntttt Name :"<<t.name;
cout<<"ntttt ContactNo :"<<t.cno;
cout<<"ntttt Showtimings :";
switch(b)
{
case 1: cout<<"0800";
break;
case 2: cout<<"1300";
break;
case 3: cout<<"1450";
break;
case 4: cout<<"1800";
break;
case 5: cout<<"2100";
break;
case 6: cout<<"0100";
break;
}
cout<<"nnttttDo you want to choose another
option(y/n)";
cin>>ans;
system("CLS");
break;
}break;
case 2: system("CLS");
cout<<"nnThankyou for booking the tickets online n To
printout the tickets please enter your transaction ID in the portal";
//Finding abouta prebooked ticket
struct pre
{
int trsnid;
char name[10];
} p;
cout<<"n Enter your transaction idn (Eg.lastfive digits of
the transaction id) ";
cin>>p.trsnid;
cout <<"Enter your name";
cin>>p.name;
cout<<"Sorryto say that but you will need to get the print
out of the booking because our database shows no booking by this name";
cout<<"n Do you want to choose another option(y/n)";
cin>>ans;
system("CLS");
break;
case 3: system("CLS");
cout<<"For further information aboutmovies you can
download our Application(from the GooglePlay Storeor from the iOS App Store) or
contact us at 01234567896523"; //Finding outmore aboutour
cinemas
cout<<"n Do you want to choose another option(y/n)";
cin>>ans;
system("CLS");
break;
case 4: system("CLS");
cout<<"Good Morning/Evnening n Welcome to start a
new journey with our cinemas n";
//card membership
card();
cout<<"Thankyou. n It will take us a week for completing
your registration for the card. n Please see the benefits of the card on the next
page. -->";
char f;
cout<<"n For selecting the page to go to benefits say
(y/n)n";
cin>>f;
if(f=='y')
{
cout<<"Thank you for registeration once again n
The priveleges provided with this card are as follows:";
cout<<"n 1. For every purchaseof a movie ticket
you get 25 points(1point= 1Rs.) so after 16 movies you get a freemovie ticket.";
cout<<"n 2. You areprovided with regular updates
regarding themovie and the showtimings.";
cout<<"n 3. Anytime prebooktickets for the
upcoming movie and preffered seats will be provided.";
}
cout<<"n Do you want to choose another option(y/n)";
cin>>ans;
if(ans=='y')
{ system("CLS");
break;
}
else
{
exit(0);
}
break;
case 5:
system("CLS");
cout<<"nttttBroughtTo You by code-projects.orgnntttt";
system("PAUSE");
exit(0);
break;
}
}while(ans=='y');
}
//Function Declaration for Card
void card()
{ int cardid;
cout<<"ttttWelcome to register for card facility in our cinemas";
cout<<" ntttt Enter your name: ";
cin>>v.name;
cout<<"ttttEnter your mobile number: ";
cin>>v.cno;
cout<<"ttttEnter the address: ";
gets(v.address);
cout<<"ttttEnter the mail id: ";
gets(v.emailid);
system("CLS");
int ID;
srand (time(NULL));
ID = rand() %400000 +4000000;
if (ID<0)
ID=(ID*-1);
cout<<"ttttYour new card number is - :" <<"t"<<ID;
fstream fout;
fout.open("card.dat", ios::out|ios::app);
fout<<"n Name:"<<v.name<<"n"<<"n Mobile No. :"<<v.cno<<"n"<<"n
Address:"<<v.address<<"n"<<"n Mail ID :"<<v.emailid<<"n"<<"nCard
Number:"<<ID;
fout.close();
cout<<"ttttThank you for the registeration for the card. n";
}
//Paymentsystem for the interface
void pay(inta)
{ int normal, gold, amt[2],id;
time_t t = time(NULL); //time setup
tm* timePtr = localtime(&t);
fstream fin;
fin.open("card.dat", ios::in|ios::app);
fin>>id;
cout<<"ttThank you for selecting the show. Now we request you to select
your type of seating nntttt1.NormalClassnttttOR ntttt2. Gold
Class";
int c;
cin>>c;
if(c==1)
{
cout<<"nnttttYou selected for a Normalshow nntttt";
system("PAUSE");
system("CLS");
amt[1] = a * 400;
char final;
cout<<"nnttttDo you have DTcard(y/n): ";
cin>>final;
if(final=='y')
{
int cid;
fin.read((char*) &v, sizeof(v));
cout<<"nttttEnter the card number[10 digits]: ";
if(cid==id)
{
amt[1]=amt[1] - (0.1*amt[1]);
};
}
cout<<"nttttWantto pay by Card(y/n): ";
char rep;
cin>>rep;
cout<<"ntttt"<<"Paying :"<<amt[1]<<"n";
if (rep=='y'||rep=='Y')
{
cout<<"ttttName of the card holder: ";
char n[10];
gets(n);
cout<<"nttttEnter the card number: ";
char Card[16];
gets(Card);
cout<<"ttttExpiry(MM/YYYY)";
int expirymm,expiryyy;
cin>>expirymm;
cout<<"tttt/";
cin>>expiryyy;
while(expirymm<(timePtr->tm_mon) || expiryyy<(timePtr-
>tm_year + 1900)){
if(expirymm<=(timePtr->tm_mon))
{
cout<<"ttttEnter the month again: ";
cin>>expirymm;
}
if(expiryyy<(timePtr->tm_year + 1900))
{
cout<<"ttttPlease enter a valid year: ";
cin>>expiryyy;
}
};
char password[3],vh;
int h;
puts("ttttEnter the CVV/CVV2: ");
while (1)
{
if (h<0)
h=0;
vh=getch();
if (vh==13)
break;
if (vh==8)
{
putch(NULL);
putch(NULL);
putch(NULL);
h--;
continue;
}
password[h++]=vh;
vh='*';
putch(vh);
};
password[h]=='0';
}
} else
{ cout<<"nnttttYou selected for the Gold Class ntttt";
system("PAUSE");
system("CLS");
amt[2] = a * 700;
char final;
cout<<"nttttDo you have DTcard(y/n): ";
cin>>final;
if(final=='y')
{
int cid;
cout<<"nttttEnter the card id number: ";
cin>>cid;
if(cid==id)
{ amt[1]=amt[1] - (0.1*amt[1]);
};
} cout<<"nttttWantto pay by Card(y/n): ";
char rep;
cin>>rep;
cout<<"ntttt"<<"Paying :"<<amt[2]<<"n";
if (rep=='y'||rep=='Y')
{ cout<<"ttttName of the card holder: ";
char n[10];
gets(n);
cout<<"nttttEnter the card number: ";
char Card[16];
gets(Card);
cout<<"nttttExpiry(MM/YY): ";
int expirymm, expiryyy;
cin>>expirymm;
cout<<"n/";
cin>>expiryyy;
while(expirymm<(timePtr->tm_mon) || expiryyy<(timePtr-
>tm_year + 1900)){
if(expirymm<=(timePtr->tm_mon))
{ cout<<"nttttEnter the month again: ";
cin>>expirymm;
}
if(expiryyy<(timePtr->tm_year + 1900))
{ cout<<"nttttPlease enter a valid year: ";
cin>>expiryyy;
}
};
char password[3],vh;
int h;
puts("nttttEnter the CVV/CVV2: ");
while (1)
{ if (h<0)
h=0;
vh=getch();
if (vh==13)
break;
if (vh==8)
{ putch(NULL);
putch(NULL);
putch(NULL);
h--;
continue;
}
password[h++]=vh;
vh='*';
putch(vh);
};
password[h]=='0';
}
};
}
1.COMPUTER SCIENCEWITH C++ (SUMITAARORA)
2.TUTORIALPOINT.COM
3.GEEKSFORGEEKS.COM
4.GITHUB.COM
5.TURBO C++
6.DEV C++
computer science project on movie booking system

computer science project on movie booking system

  • 1.
    2019-20 ANURAG YADAV XII ‘A’ MOVIEBOOKING SYSTEM COMPUTER SCIENCE PROJECT JAWAHAR NAVODAYA VIDYALAYA KANPUR DEHAT
  • 2.
    CERTIFICATE Thisishereby to certifythat ,the originaland genuine investigation work hasbeen carried out to investigate about subject matterand the relateddata collection and investigations hasbeen completed solely ,sincerely and satisfactorily done by ANURAG YADAV astudentof classXII of theacademic session 2019-20regardingthe investigatoryprojectetitled MOVIEBOOKING SYSTEM
  • 3.
  • 4.
    I would liketo sincerely and profusely thank my Computer science teacher Mr.AMIR ALI SABRI for his able guidance and vital support in completing my project. I also express my sincere thanks to my classmates who extend helping hand in completing this project ANURAG YADAV Class:-XII Roll no:-23663420
  • 5.
    1. acknoledgement 2. contents 3.programcode 4. outputs 5. references Topic:- moviebookingsystem
  • 6.
    theater //Header Files #include <iostream> #include<fstream> #include <conio.h> #include <string> #include <math.h> #include <stdlib.h> #include <stdio.h> #include <process.h> #include <time.h> using namespacestd; class ticket{ public: char name[10]; char cno[10]; } t; //object definition for ticket // Class definition for card class card : public ticket{ //inheritence for public ticket public: char address[50];
  • 7.
    char emailid[20]; } v; //objectdefinition for card //PrototypeCall for the functionsdefinitions. void pay(int); void random(); void card(); //Main function int main(){ system("CLS"); //Integer Declaration int ent, a, b, N, x, cardid; char ans; //To display the system time. //Using time header file {time_t t = time(NULL); tm* timePtr = localtime(&t); cout << "Time of the computer presently:"; cout << "seconds= " << timePtr->tm_sec << endl; cout << "minutes = " << timePtr->tm_min << endl; cout << "hours= " << timePtr->tm_hour << endl; cout << "day of month = " << timePtr->tm_mday<< endl; cout << "month of year = " << timePtr->tm_mon << endl; cout << "year = " << timePtr->tm_year + 1900 << endl; cout << "weekday = " << timePtr->tm_wday << endl;
  • 8.
    cout << "dayof year = " << timePtr->tm_yday<< endl; cout << "daylightsavings = " << timePtr->tm_isdst << endl; } //An exit controlled loop (Do...While) do{ //Menu cout<<"nttt ----------------------------------"; cout<<"nttt SimpleMovie Ticket Booking System"; cout<<"nttt ----------------------------------"; cout<<"ntttt WelcomeCustomer!"; //Menu for the user cout<<"nntttt<1> Movie Timings"; cout<<"ntttt <2> Recieving Ticket"; cout<<"ntttt <3> For Information"; cout<<"ntttt <4> DTCard Registration"; cout<<"ntttt <5> Exit nn"; cout<<"ttttEnter Your Choice :"<<"t"; cin>>ent; switch(ent) { //Movie Titles case 1: system("CLS"); cout<<"nnttttTheShowsare :"; cout<<"nntttt1. Avengers: InfinityWar"; cout<<"nntttt2. Antman And The Wasp"; cout<<"nntttt3. Deadpool2";
  • 9.
    cout<<"nntttt4. Venom"; cout<<"nntttt5. CaptainMarveln"; cout<<"nttttEnter Your Choice :"<<"t"; cin>>a; cout<<"nnttttThe Timings for the selected show are:"; switch(a) { case 1: system("CLS"); cout<<"nnttttSelect the the timings: "; cout<<"ntttt 1. 0800"; cout<<"ntttt 2. 1300"; cout<<"ntttt 3. 1450"; cout<<"ntttt 4. 1800"; cout<<"ntttt 5. 2100"; cout<<"ntttt 6. 0100 n"; //Timingsof the show cout<<"nnttttPlease select the timings: "; cin>>b; cout<<"nnttttEnter your name: "; cin>>t.name; cout<<"nnttttEnter your contact number: "; cin>>t.cno; cout<<"nnttttEnter the number of tickets you want to purchase: "; int x; cin>>x;
  • 10.
    pay(x); cout<<"nnnttttYour ticket ishere: "; cout<<"ntttt Name :"<<t.name; cout<<"ntttt ContactNo :"<<t.cno; cout<<"ntttt Showtimings :"; switch(b) { case 1: cout<<"0800"; break; case 2: cout<<"1300"; break; case 3: cout<<"1450"; break; case 4: cout<<"1800"; break; case 5: cout<<"2100"; break; case 6: cout<<"0100"; break; } cout<<"nnttttDo you want to choose another option(y/n)"; cin>>ans; system("CLS"); break; case 2: system("CLS"); cout<<"nnttttSelectthe the timings:";
  • 11.
    cout<<"ntttt 1. 0900"; cout<<"ntttt2. 1100"; cout<<"ntttt 3. 1250"; cout<<"ntttt 4. 1500"; cout<<"ntttt 5. 2000"; cout<<"ntttt 6. 2200"; cout<<"ntttt Please select the timings: "; cin>>b; cout<<"nnttttEnter your name: "; cin>>t.name; cout<<"ntttt Enter your contactnumber: "; cin>>t.cno; cout<<"ntttt Enter the number of tickets you want to purchase: "; cin>>x; pay(x); cout<<"nnttttYour ticket is here:"; cout<<"ntttt Name :"<<t.name; cout<<"ntttt ContactNo :"<<t.cno; cout<<"nttttShowtimings :"; switch(b) { case 1: cout<<"0800"; break; case 2: cout<<"1300"; break; case 3: cout<<"1450";
  • 12.
    break; case 4: cout<<"1800"; break; case5: cout<<"2100"; break; case 6: cout<<"0100"; break; } cout<<"nnttttDo you want to choose another option(y/n)"; cin>>ans; system("CLS"); break; case 3: system("CLS"); cout<<"nnttttSelectthe the timings:"; cout<<"ntttt 1. 0800"; cout<<"ntttt 2. 1300"; cout<<"ntttt 3. 1450"; cout<<"ntttt 4. 1800"; cout<<"ntttt 5. 2100"; cout<<"ntttt 6. 0100"; cout<<"ntttt Please select the timings"; cin>>b; cout<<"ntttt Enter your name: "; cin>>t.name; cout<<"ntttt Enter your contactnumber: ";
  • 13.
    cin>>t.cno; cout<<"nttttEnter the numberof tickets you want to purchase: "; cin>>x; pay(x); cout<<"nnttttYour ticket is here: "; cout<<"ntttt Name :"<<t.name; cout<<"ntttt ContactNo :"<<t.cno; cout<<"ntttt Showtimings :"; switch(b) { case 1: cout<<"0900"; break; case 2: cout<<"1300"; break; case 3: cout<<"1450"; break; case 4: cout<<"1800"; break; case 5: cout<<"2100"; break; case 6: cout<<"0100"; break; } cout<<"nnttttDo you want to choose another option(y/n)"; cin>>ans;
  • 14.
    system("CLS"); break; case 4: system("CLS"); cout<<"nnttttSelectthethe timings: "; cout<<"ntttt 1. 0800"; cout<<"ntttt 2. 1300"; cout<<"ntttt 3. 1450"; cout<<"ntttt 4. 1800"; cout<<"ntttt 5. 2100"; cout<<"ntttt 6. 0100"; cout<<"ntttt Please select the timings: "; cin>>b; cout<<"ntttt Enter your name: "; cin>>t.name; cout<<"ntttt Enter your contactnumber: "; cin>>t.cno; cout<<"ntttt Enter the number of tickets you want to purchase: "; cin>>x; pay(x); cout<<"nnttttYour ticket is here: "; cout<<"ntttt Name :"<<t.name; cout<<"ntttt ContactNo :"<<t.cno; cout<<"ntttt Showtimings :"; switch(b) { case 1: cout<<"0800";
  • 15.
    break; case 2: cout<<"1300"; break; case3: cout<<"1450"; break; case 4: cout<<"1800"; break; case 5: cout<<"2100"; break; case 6: cout<<"0100"; break; } cout<<"nnttttDo you want to choose another option(y/n)"; cin>>ans; system("CLS"); break; case 5: system("CLS"); cout<<"nnttttSelectthe the timings:"; cout<<"ntttt 1. 0800"; cout<<"ntttt 2. 1300"; cout<<"ntttt 3. 1450"; cout<<"ntttt 4. 1800"; cout<<"ntttt 5. 2100"; cout<<"ntttt 6. 0100";
  • 16.
    cout<<"ntttt Please selectthe timings: "; cin>>b; cout<<"ntttt Enter your name: "; cin>>t.name; cout<<"ntttt Enter your contactnumber: "; cin>>t.cno; cout<<"ntttt Enter the number of tickets you want to purchase: "; cin>>x; pay(x); cout<<"n nttttYour ticket is here: "; cout<<"ntttt Name :"<<t.name; cout<<"ntttt ContactNo :"<<t.cno; cout<<"ntttt Showtimings :"; switch(b) { case 1: cout<<"0800"; break; case 2: cout<<"1300"; break; case 3: cout<<"1450"; break; case 4: cout<<"1800"; break; case 5: cout<<"2100"; break;
  • 17.
    case 6: cout<<"0100"; break; } cout<<"nnttttDoyou want to choose another option(y/n)"; cin>>ans; system("CLS"); break; }break; case 2: system("CLS"); cout<<"nnThankyou for booking the tickets online n To printout the tickets please enter your transaction ID in the portal"; //Finding abouta prebooked ticket struct pre { int trsnid; char name[10]; } p; cout<<"n Enter your transaction idn (Eg.lastfive digits of the transaction id) "; cin>>p.trsnid; cout <<"Enter your name"; cin>>p.name; cout<<"Sorryto say that but you will need to get the print out of the booking because our database shows no booking by this name"; cout<<"n Do you want to choose another option(y/n)"; cin>>ans;
  • 18.
    system("CLS"); break; case 3: system("CLS"); cout<<"Forfurther information aboutmovies you can download our Application(from the GooglePlay Storeor from the iOS App Store) or contact us at 01234567896523"; //Finding outmore aboutour cinemas cout<<"n Do you want to choose another option(y/n)"; cin>>ans; system("CLS"); break; case 4: system("CLS"); cout<<"Good Morning/Evnening n Welcome to start a new journey with our cinemas n"; //card membership card(); cout<<"Thankyou. n It will take us a week for completing your registration for the card. n Please see the benefits of the card on the next page. -->"; char f; cout<<"n For selecting the page to go to benefits say (y/n)n"; cin>>f; if(f=='y') { cout<<"Thank you for registeration once again n The priveleges provided with this card are as follows:";
  • 19.
    cout<<"n 1. Forevery purchaseof a movie ticket you get 25 points(1point= 1Rs.) so after 16 movies you get a freemovie ticket."; cout<<"n 2. You areprovided with regular updates regarding themovie and the showtimings."; cout<<"n 3. Anytime prebooktickets for the upcoming movie and preffered seats will be provided."; } cout<<"n Do you want to choose another option(y/n)"; cin>>ans; if(ans=='y') { system("CLS"); break; } else { exit(0); } break; case 5: system("CLS"); cout<<"nttttBroughtTo You by code-projects.orgnntttt"; system("PAUSE"); exit(0); break; } }while(ans=='y');
  • 20.
    } //Function Declaration forCard void card() { int cardid; cout<<"ttttWelcome to register for card facility in our cinemas"; cout<<" ntttt Enter your name: "; cin>>v.name; cout<<"ttttEnter your mobile number: "; cin>>v.cno; cout<<"ttttEnter the address: "; gets(v.address); cout<<"ttttEnter the mail id: "; gets(v.emailid); system("CLS"); int ID; srand (time(NULL)); ID = rand() %400000 +4000000; if (ID<0) ID=(ID*-1); cout<<"ttttYour new card number is - :" <<"t"<<ID; fstream fout; fout.open("card.dat", ios::out|ios::app); fout<<"n Name:"<<v.name<<"n"<<"n Mobile No. :"<<v.cno<<"n"<<"n Address:"<<v.address<<"n"<<"n Mail ID :"<<v.emailid<<"n"<<"nCard Number:"<<ID; fout.close();
  • 21.
    cout<<"ttttThank you forthe registeration for the card. n"; } //Paymentsystem for the interface void pay(inta) { int normal, gold, amt[2],id; time_t t = time(NULL); //time setup tm* timePtr = localtime(&t); fstream fin; fin.open("card.dat", ios::in|ios::app); fin>>id; cout<<"ttThank you for selecting the show. Now we request you to select your type of seating nntttt1.NormalClassnttttOR ntttt2. Gold Class"; int c; cin>>c; if(c==1) { cout<<"nnttttYou selected for a Normalshow nntttt"; system("PAUSE"); system("CLS"); amt[1] = a * 400; char final; cout<<"nnttttDo you have DTcard(y/n): "; cin>>final; if(final=='y') {
  • 22.
    int cid; fin.read((char*) &v,sizeof(v)); cout<<"nttttEnter the card number[10 digits]: "; if(cid==id) { amt[1]=amt[1] - (0.1*amt[1]); }; } cout<<"nttttWantto pay by Card(y/n): "; char rep; cin>>rep; cout<<"ntttt"<<"Paying :"<<amt[1]<<"n"; if (rep=='y'||rep=='Y') { cout<<"ttttName of the card holder: "; char n[10]; gets(n); cout<<"nttttEnter the card number: "; char Card[16]; gets(Card); cout<<"ttttExpiry(MM/YYYY)"; int expirymm,expiryyy; cin>>expirymm;
  • 23.
    cout<<"tttt/"; cin>>expiryyy; while(expirymm<(timePtr->tm_mon) || expiryyy<(timePtr- >tm_year+ 1900)){ if(expirymm<=(timePtr->tm_mon)) { cout<<"ttttEnter the month again: "; cin>>expirymm; } if(expiryyy<(timePtr->tm_year + 1900)) { cout<<"ttttPlease enter a valid year: "; cin>>expiryyy; } }; char password[3],vh; int h; puts("ttttEnter the CVV/CVV2: "); while (1) { if (h<0) h=0; vh=getch(); if (vh==13) break; if (vh==8)
  • 24.
    { putch(NULL); putch(NULL); putch(NULL); h--; continue; } password[h++]=vh; vh='*'; putch(vh); }; password[h]=='0'; } } else { cout<<"nnttttYouselected for the Gold Class ntttt"; system("PAUSE"); system("CLS"); amt[2] = a * 700; char final; cout<<"nttttDo you have DTcard(y/n): "; cin>>final; if(final=='y') { int cid; cout<<"nttttEnter the card id number: ";
  • 25.
    cin>>cid; if(cid==id) { amt[1]=amt[1] -(0.1*amt[1]); }; } cout<<"nttttWantto pay by Card(y/n): "; char rep; cin>>rep; cout<<"ntttt"<<"Paying :"<<amt[2]<<"n"; if (rep=='y'||rep=='Y') { cout<<"ttttName of the card holder: "; char n[10]; gets(n); cout<<"nttttEnter the card number: "; char Card[16]; gets(Card); cout<<"nttttExpiry(MM/YY): "; int expirymm, expiryyy; cin>>expirymm; cout<<"n/"; cin>>expiryyy; while(expirymm<(timePtr->tm_mon) || expiryyy<(timePtr- >tm_year + 1900)){ if(expirymm<=(timePtr->tm_mon)) { cout<<"nttttEnter the month again: "; cin>>expirymm; }
  • 26.
    if(expiryyy<(timePtr->tm_year + 1900)) {cout<<"nttttPlease enter a valid year: "; cin>>expiryyy; } }; char password[3],vh; int h; puts("nttttEnter the CVV/CVV2: "); while (1) { if (h<0) h=0; vh=getch(); if (vh==13) break; if (vh==8) { putch(NULL); putch(NULL); putch(NULL); h--; continue; } password[h++]=vh; vh='*'; putch(vh); };
  • 27.
  • 29.
    1.COMPUTER SCIENCEWITH C++(SUMITAARORA) 2.TUTORIALPOINT.COM 3.GEEKSFORGEEKS.COM 4.GITHUB.COM 5.TURBO C++ 6.DEV C++