its a project report for theatre management project done in c++ language without graphics.h
It has welcome screen followed by a login session.
There are two login modes- User and admin,
A user can view,book and edit his tickets for a show
An admin has privileges to add/edit/remove the Show details
This project uses text files which will be created by the code itself .
This runs fine on the old turbo c++ (blue screen) ,so should be able to run on any compiler.
How to do quick user assign in kanban in Odoo 17 ERP
c++ report file for theatre management project
1. C++ PROJECT 2012-2013 C++ PROJECT 2012-2013C++
PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
C++ PROJECT C++ PROJECT C++ PROJECT C++
PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
C++ PROJECT C++ PROJECT C++ PROJECT C++
PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
C++ PROJECT C++ PROJECT C++ PROJECT C++
PROJECT
C++ PROJECT
C++ PROJECT C++ PROJECT C++ PROJECT
C++ PROJECT REPORT
C++ PROJECT C++ PROJECT C++
PROJECT C++ PROJECT 2012-2013
C++ PROJECT C++ PROJECT
C++ PROJECT C++ PROJECT C++ PROJECT C++
PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
DONE BY :G RAJESH
C++ PROJECT C++ PROJECT C++ PROJECT C++
12TH A
PROJECT C++ PROJECT C++ PROJECT C++ PROJECT C++
KASTURBA ENGLISH MEDIUM SCHOOL ,
PROJECT C++MANJUMMEL C++ PROJECT C++ PROJECT C++
PROJECT
PROJECT C++ PROJECT C++ PROJECT C++ PROJECT C++
PROJECT C++TOPIC:THEATRE MANAGEMENT C++ PROJECT C++
PROJECT C++ PROJECT
PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
C++PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
C++PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
C++PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
C++PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
C++PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
C++PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
C++PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
C++PROJECT C++ PROJECT C++ PROJECT C++ PROJECT 1
C++PROJECT C++ PROJECT C++ PROJECT C++ PROJECT 1
C++PROJECT C++ PROJECT C++ PROJECT C++ PROJECT
3. KASTURBA
ENGLISH MEDIUM SENIOR SECONDARY SCHOOL
Affiliated to CBSE, New Delhi, Aff. No. : 930463
Report on the Computer Project
Name : G RAJESH
Standard : XII Science
Project Guide : Aravind Lakshman
Project : MOVIE RESERVATION
Certified that this is the bonafide report of the project
work of G Rajesh in this school submitted for the practical
examination held in 2013, Kasturba School, Manjummel.
Examiner Project Guide Principal
3
4. KASTURBA
ENGLISH MEDIUM SENIOR SECONDARY SCHOOL
Affiliated to CBSE, New Delhi, Aff. No. : 930463
Bonafide Certificate
I certify that G Rajesh Student of Computer Science
studying in Std XII, Kasturba Senior Secondary School,
Manjummel has successfully completed the project
“MOVIE RESERVATION” under my guidance during the year
2012-2013
Project Guide
4
5. INDEX
1.ACKNOWLEDGEMENT
2.AIM
3. APPARATUS
4. FLOW CHART
5. PROGRAM DESCRIPTION
6. PROGRAM CODE
7. OUTPUT
8.BIBILIOGRAPHY
5
6. ACKNOWLEDGEMENT
I Would Like To Express My Deep Sense Of Gratitude To
All Those Who Have Helped Me In Completing This Project.
I Specially Thank Our Sir Aravind Lakshman Who
Gave Me All Guidance To Complete My Project Work Successfully.
Apart From It, I Acknowledge My Parents, Group
members And All Others Who Helped Me For Completing This
Great Task.
Above All I Thank The Almighty God For Making
This Project A Great Success.
AIM
6
7. This is a program done in C++ language to reserve a movie ticket by users
from a list of movies which are managed by the administrator.
The user must provide his name and other details to book his/her desired
movie in the list.
APPARATUS
7
8. HARDWARE:-
LOGITECH MOUSE
LOGITECH KEYBOARD
HP PRINTER
INTEL DUAL CORE
LCD MONITOR
SOFTWARE:-
WINDOWS XP
TURBO C++
MS DOS
MS WORD
FLOW CHART
8
10. WELCOME SCREEN
MAIN
MENU
ADMIN (‘A’)
USER (‘U’)
A
A
If
PASSWORD
Choice== TRUE AND USERNAME FALSE
EXIT
’a’||’a’
a1
TRUE TICKET INITIALISE(‘T’)
MOVIE LIST(‘A’)
ADMIN MENU MODIFY MENU(‘M’
SETTINGS(‘S’)
BOOKING LIST(‘B’)
ach EXIT(‘E’)
BOOK(‘B’)
CANCEL(‘C’)
USER MENU
If choice !=’U’ 10
&& !=’A’
11. TRUE
MODIFY(‘M’)
EXIT AS USER(‘E’)
ELSE EXIT(‘E’)
mch SWITCH(‘S’)
m2
ach a1
TICKETS INITIALISE
If Choice==
’t’||’T’ TRUE TC.TXT
a3
a1
If Choice== DISPLAY ALL MOVIE’S DETAILS
’a’||’A’ TRUE MT.TXT
a2
11
12. ADD MOVIES(‘A’)
EDIT MOVIES(‘E’)
If Choice== MODIFYING
’m’||’M’ MENU
TRUE MODIFY MOVIES(‘M’)
EXIT MODIYING(‘E’)
ach 2 READ CHOICE
a1
If Choice== BOOKING LIST
’b’||’B’ TRUE MB.TXT
If Choice== COLOUR SETTINGS m1
’s’||’S’ TRUE
If Choice==
m2
’e’||’E’ TRUE
a1
ELSE
ach 2
12
13. ADD MOVIES
if choice==
a3
‘a’||’A’ TRUE MT.TXT
If choice== MODIFY MOVIE
a3
‘m’||’M’ TRUE MT.TXT
If choice==
‘d’||’D’ TRUE DELETE MOVIE
a3
MT.TXT
If choice== a1
TRUE
‘e’||’E’
a2
ELSE
uch
u1 13
14. If choice==
TRUE BOOK MOVIE
‘b’||’B’
MB.TXT u1
DETAILS
u1
MB.TXT
If choice== TRUE CANCEL BOOKING TRUE
‘c’||’C’ FALSE u1
TICKET NUMBER
u1
MB.TXT
If choice==
TRUE MODIFY BOOKING TRUE
‘m’||’M’
FALSE u1
TICKET NUMBER
If choice=== TRUE
m2
‘e’||’E’
ELSE
u1
mch
14
15. If choice=== TRUE EXIT
EXIT
‘e’||’E’ SCREEN
If choice=== m1
TRUE
‘s’||’S’
PROGRAM
DESCRIPTION
15
16. This is a user friendly and menu driven
program which is designed to book tickets
for a movie by the user by providing the
necessary details.......
When the program is executed ,the welcome
screen appears showing the logo of the
theatre‟s name and then shows the option to
enter as an admin or a user.
The Admin menu is accessible only after
providing the right username and password
combination within 3 chances.
The admin module has 6 options :
Initialise tickets („T‟)
Movies running („A‟)
Modify movies („M‟)
16
17. Settings („S‟)
See booking list („B‟)
Exit as admin („E‟)
The “modify movies” option has a menu of
adding movies, deleting current movies and
editing the current movie details.
The option “settings” deals with customizing
the background colour and text colour.
The user menu has a simple menu containing
the options:
Book a movie(„B‟)
Modify a booking(„M‟)
Cancel a booking(„B‟)
Exit as user(„E‟)
When the “book a movie” option is selected
the list of all movies running in the theatre is
shown. The user has to select a movie and
then enter his/her details like name, age,
number of tickets to be booked and contact
17
18. details. The total fare is calculated and is
shown along with the main ticket number.
The program is a very interactive and
interesting with colourful texts and coloured
background for each module making it very
close to real life booking of movie tickets as
on internet....
PROGRAM CODE
18
19. /*
******
T H E A T H T R E M A N A G E M E N T P R O J E C T ******
Done By:
G Rajesh
12th Science 2012-2013
Kasturba English Medium School
Manjummel */
#include<iostream.h> //For Basic Input/output Operations
#include<fstream.h> //For File Handling Operations
#include<conio.h> //For getch() & clrscr() Functions
#include<dos.h> //For delay() function
#include<stdio.h> //For gets(),puts(),remove()& rename()..
#include<string.h> //For strcmp() ,strcpy() Functions
#include<process.h> //For Exit() Function
#include<time.h> //For displaying time in user module
int mi=0;
int mj=10;
int ai=0;
int aj=11;
int ui=8;
int uj=9;
char ch,c1,c2,name[30]; //G L O B A L V A R I A B L E S
int i,p,p1,r; // used throughout the program
long pos;
char aname[20],apass[20];
fstream fin,fout,file; //G L O B A L F I L E P O I N T E R
S
19
20. class admin //Class Defined for Administration Module
{
public:
char mname[30];
void admn();
void result();
protected:
char mlang[20];
char mdes[50];
int mstars;
char mactors[30];
char mdirector[20];
float mprice;
char mcbfc[5];
char mtiming[20];
private:
void tcrun();
void edit();
void modify();
void del();
void add();
void settings();
public:
void seatmanage(int);
void amtcal(int);
int mseats;
int tick;
admin() // Constructor for class admin
{
strcpy(mname,"<no name>");
strcpy(mlang,"<no info>");
strcpy(mdes,"<no info>");
strcpy(mactors,"<no info>");
strcpy(mdirector,"<no info>");
strcpy(mcbfc,"n/a");
mstars=0;
tick=0;
mseats=0;
}
void showseats()
{
if(mseats>0)
cout<<mseats;
else
{
textcolor(0);cout<<"HOUSE FULL!!!";
}
}
}a;
class user:protected admin //Class for User Module Protectedly
Inherited from class Admin
{
private:
char uname[30];
int uage;
20
21. int uno;
char uphone[20];
int utc;
char mov[30];
public:
void showbooked();
void tcallote();
void umenu();
void uedit();
void ucancel();
void ubooking();
user()
{
strcpy(uname,"empty ");
uage=0;
uno=0;
utc=0;
strcpy(uphone,"n/a");
}
protected:
}u;
void main()
{
clrscr();
int j,k;
gotoxy(24,19);
cout<<"L O A D I N G P R O J E C T F I L E "<<endl;
gotoxy(28,22);
cout<<"___________";
j=28;
for(int i=0;i<101;i++)
{
gotoxy(41,22);
delay(50);
cout<<i<<"% completed"<<endl;
if(i%10==0)
{
gotoxy(j,22);
j++;
cout<<char(16);
}
}
cout<<"nnttttSUCCESSFULLY LOADED" <<endl;
c1='s';
while(c1=='s'||c1=='S')
{
delay(500);
textbackground(mi);
textcolor(mj);
clrscr();
int i,x=1;
cout<<"╔";
delay(100);
for(i=0;i<78;i++)
{
21
27. cputs("n _/_/_/_/_/ _/ _/
");cout<<endl;
cputs(" _/ _/_/_/ _/_/_/ _/_/_/ _/ _/
");cout<<endl;
cputs(" _/ _/ _/ _/ _/ _/ _/ _/_/
");cout<<endl;
cputs(" _/ _/ _/ _/ _/ _/ _/ _/ _/
");cout<<endl;
cputs(" _/ _/ _/ _/_/_/ _/ _/ _/
_/");cout<<endl;
cout<<"nnn";
cputs(" _/ _/
");cout<<endl;
cputs(" _/ _/ _/_/_/_/ _/ _/
");cout<<endl;
cputs(" _/ _/ _/ _/ _/
");cout<<endl;
cputs(" _/ _/ _/ _/ _/
");cout<<endl;
cputs(" _/ _/_/_/_/ _/_/_/_/
");cout<<endl;
}
cout<<"nnn Press any key to exit"<<endl;
getch();
cout<<"n Program Teriminated"<<endl;
delay(500);
exit(0);
}
getch();
}
void admin::admn()
{
char temp[]={"nnttW E L C O M E T O I M A X D A T A B A S
E "};
clrscr();
textcolor(4);
textbackground(0);
clrscr();
int j;
if(p1==1)
goto l;
for(i=0;i<3;i++) //Checking Password & User Name
Combination
{
delay(300);
clrscr();
cout<<"nttAUTHENTICATION REQUIRED"<<endl;
cout<<"nUserName: "<<endl;
cout<<"PassWord: "<<endl;
gotoxy(10,4);
gets(aname);
gotoxy(10,5);
for(j=0;j<20;j++)
{
apass[j]=getch();
27
28. if(apass[j]=='r')
break;
cout<<"*";
}
apass[j]='0';
cout<<"nChecking Username and Password Combination ";
for(int che=0;che<7;che++)
{
delay(300);cout<<".";
}
if((strcmp(aname,"raj32")==0))
{
if((strcmp(apass,"rgr2511")==0) )
{
p=1;
break;
}
else
{
p=0;
cout<<"anWrong User Name and Pass Word combination"<<endl;
if(i==2)
{
cout<<"nAUTHENTICATION FAILED!!!"<<endl;
cout<<"nEXITING"<<endl;
delay(900);
exit(0);
}
else
{
cout<<"No. of chances remaining: "<<(2-i)<<endl;
delay(900);
}
}
}
}
if(p==1)
{
clrscr();
textcolor(10);
clrscr();
gotoxy(20,20);
cout<<" L O G I N S U C C E S S F U L !!"<<endl; //Welcome Screen
For Admin
delay(1000);
textcolor(14);
clrscr();
gotoxy(1,20);
for(i=0;i<52;i++)
{
delay(70);
cout<<temp[i];
}
delay(800);
l:
if(i==3)
28
29. goto ex;
textcolor(aj);
textbackground(ai);
clrscr();
cout<<"nt ADMIN'S MENUn"<<endl;
delay(500);
gotoxy(46,7);
cout<<""T" TICKET initialising";
delay(500);
gotoxy(52,13);
cout<<""A"";
cout<<" MOVIES running";
delay(500);
gotoxy(47,19);
cout<<""M"";
cout<<" MODIFY menu ";
gotoxy(20,19);
delay(500);
cout<<"colour SETTINGS "S"";
gotoxy(16,13);
delay(500);
cout<<"BOOKING list "B"";
gotoxy(21,7);
delay(500);
cout<<"EXIT as ADMIN ";
cout<<""E"";
gotoxy(43,13);
c1=getche();
cout<<endl;
clrscr();
if(c1=='t'||c1=='T')
{
a.tcrun();
}
else if(c1=='s'||c1=='S')
{
settings();
}
else if(c1=='a'||c1=='A')
{
cout<<"nThe Movies Running In IMAX are :"<<endl;
delay(800);
clrscr();
fout.open("mt.txt",ios::in);
while(fout.read((char*)&a,sizeof(a)))
{
a.result();
}
fout.close();
for(i=0;i<80;i++)
cout<<"=";
cout<<"nn"<<endl;
i=0;
cout<<"Press Any Key To Continue"<<endl;
getch();
cout<<"nnRedirecting To ADMIN'S MENU "<<endl;
29
42. cout<<"Enter Your name "<<endl;
gets(uname);
cout<<"Enter your age "<<endl;
cin>>uage;
cout<<"Enter the no. of tickets to be booked "<<endl;
cin>>uno;
cout<<"Enter your phone number or email id"<<endl;
gets(uphone);
cout<<"Want To confirm booking for ";puts(name);
c2=getche();
if(c2=='y')
{
i=0;
fout.open("mb.txt",ios::out|ios::app);
cout<<"nYour Ticket number(s) are:"<<endl;
tcallote();
cout<<"Your Main Ticket number is: "<<u.utc<<endl;
a.seatmanage(u.uno);
fout.write((char*)&u,sizeof(u));
a.amtcal(u.uno);
delay(600);
cout<<"nnT H A N K Y O U F O R B O O K I N G
"<<char(1)<<char(2)<<endl;
cout<<"Enjoy The Movie"<<endl;
delay(80);
cout<<endl<<endl;
textcolor(ui+2);
cputs("* NOTE :Use your Main Ticket Number Given Above");cout<<endl;
cputs(" For Cancelling/Changing your Booking *");cout<<endl;
fout.close();
cout<<"Press Enter To Continue"<<endl;
ch=getch();
if(ch=='r')
{
cout<<"Redirecting to user menu"<<endl;
cout<<char(24)<<endl;
delay(1800);
}
umenu();
}
if(c2=='n')
{
p1=1;
umenu();
}
}
void user::tcallote() //Allocating Ticket Number After Booking a
Movie
{
c2='n';
int cnt=u.uno;
fstream f1;
int tics;
f1.open("mt.txt",ios::app|ios::in);
while(f1.read((char*)&a,sizeof(a)))
{
42
43. if(strcmp(a.mname,name)==0)
{
tics=a.tick;
while(cnt>0)
{
tics++;
cnt--;
cout<<tics<<endl;
delay(300);
}
break;
}
}
f1.close();
u.utc=tics;
}
void user::ucancel() // For Cancelling The Movie Booked
{
cout<<"Enter The Movie U booked for"<<endl;
fstream f1;
f1.open("mb.txt",ios::in);
i=0;
f1.seekg(0);
while(f1.read((char *)&u,sizeof(u)))
{
i++;
cout<<i<<" "<<char(13)<<" "<<mov<<endl;
}
r=0;
f1.close();
f1.open("mb.txt",ios::in);
f1.seekg(0);
cin>>r;i=0;
while(f1.read((char *)&u,sizeof(u)))
{
i++;
if(i==r)
{
strcpy(name,mov);
cout<<"nMovie selected :"<<name<<endl;
}
}
f1.close();
cout<<"Canceling...."<<endl;
cout<<"Enter Your Main Ticket Number "<<endl;
cin>>r;
fin.open("mb.txt",ios::in);
fout.open("temp.txt",ios::out);
while(fin.read((char*)&u,sizeof(u)))
{
if((r==utc)&&strcmp(name,u.mov)==0)
{
p=1;
cout<<"FOUND"<<endl;
cout<<"Name :";puts(uname);
cout<<"Ticket No:"<<utc<<endl;
43
44. cout<<"Movie :"<<u.mov<<endl;
strcpy(name,u.mov);
cout<<"CANCEL BOOKING????"<<endl;
c2=getche();
if(c2=='n'||c2=='N')
fout.write((char*)&u,sizeof(u));
}
else
{
fout.write((char*)&u,sizeof(u));
}
}
if(c2=='y'||c2=='Y')
{
strcpy(name,mov);
cout<<"Your Ticket Is Successfully Cancelled"<<endl;
a.seatmanage((-u.uno));
}
if(p==1&&c2!='y')
cout<<"Your Ticket Is not Cancelled"<<endl;
if(p!=1)
cout<<"Not Found"<<endl;
fin.close();
fout.close();
remove("mb.txt");
rename("temp.txt","mb.txt");
cout<<"Press Any Key"<<endl;
getch();
canex:cout<<"Redirecting to User Menu"<<char(24)<<endl;delay(1800);
umenu();
}
void user::uedit() //For Changing The Details Of No. of
Tickets,Contact Details
{
cout<<"Enter The Movie U booked for"<<endl;
fstream f1;
f1.open("mb.txt",ios::in);
i=0;
f1.seekg(0);
while(f1.read((char *)&u,sizeof(u)))
{
i++;
cout<<i<<" "<<char(13)<<" "<<mov<<endl;
}
cin>>r;
f1.close();
i=0;
f1.open("mb.txt",ios::in);
f1.seekg(0);
while(f1.read((char *)&u,sizeof(u)))
{
i++;
if(i==r)
{
strcpy(name,u.mov);
44
45. cout<<"Movie Selected :"<<name;
}
}
f1.close();
float pos;
int t;
p=0;
cout<<"nModify Your Booking "<<endl;
fout.open("mb.txt",ios::in|ios::out);
cout<<"Enter Your Ticket Number :"<<endl;
cin>>t;
int n;
char cnt[30];
fout.seekg(0);
while(fout)
{
pos=fout.tellg();
fout.read((char*)&u,sizeof(u));
if(t==u.utc&&strcmp(name,u.mov)==0)
{
cout<<"OLD DETAILS "<<endl;
i=uno;
cout<<"Name :";
puts(uname);
cout<<"Movie :";
puts(a.mname);
cout<<"Age :"<<uage<<endl;
cout<<"No. of Tickets Booked :"<<i<<endl;
cout<<"Contact info :";
puts(uphone);
cout<<"nntEnter New Details"<<endl;
cout<<"Enter Your Name "<<endl;
gets(aname);
cout<<"Enter the no. of tickects to be booked "<<endl;
cin>>n;
cout<<"Enter the contact details "<<endl;
gets(cnt);
if(strcmp(aname,"!")!=0)
strcpy(uname,aname);
if(strcmp(cnt,"!")!=0)
strcpy(uphone,cnt);
if(n!=0)
uno=n;
fout.seekg(pos);
fout.write((char*)&u,sizeof(u));
fout.close();
p=1;
break;
}
}
if(p==0)
cout<<"Not Found "<<endl;
else
{
strcpy(name,u.mov);
if(i>n)
45
46. a.seatmanage((n-i));
if(n>i)
a.seatmanage((i-n));
delay(300);
cout<<"Details Saved"<<endl;
}
cout<<"Press Any Key"<<endl;
getch();
cout<<"Redirecting to User Menu "<<char(24)<<endl;delay(1800);
umenu();
}
void user::showbooked() //Function Used by Admin To See Booked List
{
cout<<" B O O K I N G L I S T "<<endl;
fin.open("mb.txt",ios::in);
while(fin.read((char*)&u,sizeof(u)))
{
cout<<endl;
for(i=0;i<70;i++)
cout<<char(4);
cout<<"nMovie Booked:"<<mov;
cout<<"nName: ";
puts(u.uname);
cout<<"Ticket no:"<<u.utc<<endl;
cout<<"Age :"<<u.uage<<endl;
cout<<"No. Of Tickets: "<<u.uno<<endl;
cout<<"Contact Details: "<<u.uphone<<endl;
for(r=0;r<70;r++)
cout<<char(4);
getch();
}
cout<<endl<<endl;
for(i=0;i<80;i++)
cout<<char(39);
cout<<"End Of Booked List"<<endl;
fin.close();
cout<<"Press Any Key To Continue"<<endl;
getch();
cout<<"Returning to Admin's Menu"<<char(24)<<endl;
delay(1000);
p1=1;
a.admn();
} //END OF PROGRAM
46