Академический Документы
Профессиональный Документы
Культура Документы
fstream.h
ifstream f
cout<<endl
stdio.h
gets()
puts()
conio.h
clrscr()
graphics.h
closegraph()
string.h
strcmp()
dos.h
sleep()
stdlib.h
exit(0)
Data Structures
class Movie
{
public:
int n, day, col, row;
int seatarray[6][9];
void getputdata();
void clearseat();
Movie() //constructor
{
clearseat();
}
};
class movie:public Movie
{
private:
char movnam[50], movlang[50],
cast[50], genre[50], rtime[50];
public:
char movid[5];
char*retname()
{ return movnam;
}
void inpt();
void outpt();
};
Functions
void enter();
To display “Aldelphi Cinemas”
and the “Loading” page.
void uop();
To display the user’s page and
his options:
Order food online option
Find us
View Currently showing
movies
void menu();
To let the user choose between
1) Admin Page
2) User Page
3) Exit
void bill();
To let the user buy food:
Popcorn – 20AED
Nachos – 25AED
Pepsi – 13AED
Each ticket costs 100AED
To calculate and display the bill.
void usermov();
To display the movie details for
the user, reading from the
existing file, “temp.dat”, created
by the admin.
void user();
To allow the user to select their
movie, day, and seat, and book
accordingly.
The user cannot book a seat
that had been previously
booked.
void adminmov();
Admin’s homepage.
To allow the admin to either
view the movie inventory or
change it.
void adminview();
To display the movie details for
the admin.
void admininvent();
To allow the admin to change
the movie inventory and delete
the existing booked seats.
void Movie::clearseat();
To initialise all the seats to
“unoccupied”
void Movie::getoutdata();
To allow the user to book seats.
void Movie::inpt();
To input the movie details from
the admin.
void Movie::outpt();
To display the movie details.
Void loadbookings();
To read the previously booked
seats at the beginning of the
program.
Void clearbookings();
To delete all the bookings.
Data Files
temp.dat
k3g1.dat
k3g2.dat
k3g3.dat
prdp1.dat
prdp2.dat
prdp3.dat
khnh1.dat
khnh2.dat
khnh3.dat
okj1.dat
okj2.dat
okj3.dat