CSC 126 Project Report
CSC 126 Project Report
FACULTY
SCHOOL OF COMPUTING AND MATHEMATICS
PROGRAME
DIPLOMA IN COMPUTER SCIENCE (CS110)
SUBJECT/CODE/CLASS
FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
CSC126
JCDCS1101D
PROJECT TITLE
CINEMA TICKETING SYSTEM
PREPARED FOR:
MADAM NOR FAUZIAH BINTI ABU BAKAR
PREPARED BY:
MUHAMMAD AIMEEN SHAFIQ BIN MOHD SHAFARIN(2023862888)
MUHAMMAD IRSYAD RAMLI(2023478798)
GIENA QHALILLA BINTI MOHD.HAFIDZ(2023467036)
SYAZA SYAZWANA BINTI ROSDIE(2023457048)
2
TABLE OF CONTENTS
1. PROJECT SUMMARY 3
0
2. OBJECTIVE OF PROJECT 4
0
3. DESIGN ALGORITHM – FLOWCHART & PSEUDOCODE 5-38
0
4. SOURCE CODE 38-66
0
5. SAMPLE OF OUTPUT 67-70
0
6. DISCUSSION/CONCLUSION 70
0
3
1.0 PROJECT SUMMARY
In summary, the Cinema Ticketing System is a powerful and intuitive software program that
streamlines and automates the movie ticket booking, buying, and management process in a
theatre setting. The technology is designed to guarantee smooth operations and effective
ticket sales, improving the whole moviegoing experience for patrons and theatre employees.
The Cinema Ticketing System with Food Package Integration aims to revolutionize the
cinema industry by providing a holistic solution that caters to the entertainment and dining
needs of patrons, offering a complete and enjoyable cinematic experience. Furthermore, all
services are rendered online in this day and age of modernity. Customers will thus receive
the feedback promptly. It is evident that this technique works very well in saving consumers'
time when they don't have to wait in line to purchase tickets at the counter.
Other than that , we create the responsive interface accessible across various
devices for a broad user base. This will give the user the best experience while using our
user-friendly program . In this system, customers are required to registered to an account by
using their email or phone number. As a user and customers , they can choose to choose
and watch variety of movies that are already programmed as we provide dynamic scheduling
of movie showtimes with flexibility for updates. They can also choose the location of the
cinema as every cinema are included into this system. Clients can make reservations by
choosing the type of hall they want as there are variety of halls provided.
We also create an Admin Dashboard in this program for theatre administrators to
handle movie lists, showtimes, ticket sales, and food package inventory. There are also
reporting tools for monitoring the success of both theatre and food services, so that any
change in movie, ticket price, or movie schedule can be managed conveniently and, most
importantly, without error. This will provide a positive customer experience by integrating
movie and food.
In addition , we also gives customers an option to customize food packages,
including snacks and beverages, during the booking process. A few discounts are available
such as students discount, senior citizen discount and also children discount. Each cinema
also provides a special promotion on every public holiday.
Last but not least , customers are given an options to make a payment either online
payment using card or cash at counter . For online payment , customers should not hesitate
and worried because our program comes with a secure transactions for both movie tickets
and food packages. Payment that made by online at the website, will get a reward point that
can be collected by users and they can redeem a ticket when the points collected reach the
maximum. Ticket price will include 6% of tax and for the customers who pay by online will be
charge RM1 for the service charge.
The Movie Ticketing System with its integrated food package functionality has the
potential to revolutionize the cinema industry. By providing a seamless and enjoyable
experience for patrons, and offering cinema administrators powerful tools for efficient
operations, this system sets the stage for a new era in cinema management and customer
satisfaction.
4
Table 1 showing movie prices :
5
Table 1.2,1.3 show assortment of food and drink :
6
15)HOT/ICED MILO RM4.00/RM4.50
2.0 OBJECTIVE
CALCULATION
To calculate all the selected goods and services from the user and applied discount
to be paid.
DISPLAY
To display useful information like prices, movie tickets and food combos that is
available to the user.
RECORD
To record all the user username and password login for registration.
AVERAGE
To find the average spending of each customer.
OUTPUT
To output total price after calculating the price of movie, food combos and applying
discount.
7
programSelection ← 0
selection ← 0
customerCount ← 0
totalSales ← 0
totalTicket ← 0
movieID ← 0
movie1 ← "Interstellar"
movie2 ← "Oppenheimer"
movie3 ← "Sijjin"
hall ← 0
Start
childNum ← 0
user[100] ← 0
qualityPrice ← 0
password[100] ← 0
foodPrice ← 0
i ← 1
o ← 1
A
totalSnackPrice ← 0
totalComboPrice ← 0
answer ← 0
addon ← 0
check ← False
totalAddonPrice ← 0
programSelection ← 0
totalAmount ← 0
selection ← 0
totalPrice ← 0
customerCount ← 0
totalSales ← 0 totalDiscount ← 0
movieID ← 0 enteredCode ← 0
movie3 ← "Sijjin"
movieChange ← 0
cardExpiration ← 0
childNum ← 0
specialDisc ← 0
qltyPrice ← 0
discount ← 0
ticketPrice ← 0
discountEvent ← 0
codeChange ← 0
totalSnackPrice ← 0 highest ← 0
addon ← 0
8 Loop
totalAddonPrice ← 0 Yes
programSelection = 1
No
totalAmount ← 0
Loop
totalPrice ← 0
cardCVV ← 0
cardExpiration ← 0
specialDisc ← 0
discount ← 0
discountEvent ← 0
8
discountType ← " " A
confirmation ← false
7
highest ← 0
lowest ← 10000
Loop
10 Yes
programSelection = 1
No
Loop
Yes No
answer == 1
Yes No
Loop answer == 2
Yes No
registration(newUsername, newPass) Loop answer == 3
user[i] ← newUsername
login(username, pass) Loop
password[i] ← newPass
o←1
"Enter the admin password :"GET enteredCode
i ←i + 1
Loop Yes
enteredCode== adminPass
No
PUT "Registration sucessful!"¶
Yes
((username == user[o])&&(pass==password[o]))
PUT "Incorrect"¶
No
answer ← 2
o←o + 1
Yes
answer == 2
PUT "Welcome to the Admin System"¶
No
Yes
check != true PUT "Total ticket sold today is :"+totalTicket¶
No
"What to change? 1.Promocode 2.Movie available 3.Admin code 99.Log out"GET codeChange
Yes No
adminOpt == 1
Yes No
"Enter the new promoCode : "GET promoCode adminOpt == 2
Yes No
movieID == 1
"Enter the new promoCode : "GET adminPass
Yes No
"Enter the new movie name : "GET movie1 movieID == 2 PUT "Sucessful, the new code is : "+adminPass¶
9
Yes
check == true
No
Loop
Loop
Yes No
movieID == 1
Yes No
"Enter the new movie name : "GET movie1 movieID == 2
9 Yes
8
check == true
9
No
Loop
Loop
Yes No
movieID = 1
Yes No
movieChoice ← movie1 movieID = 2
Yes No
movieChoice ← movie2 movieID = 3
Yes No
movieChoice ← movie3 movieID = 4
movieID ← 0
Yes
movieID != 0
No
Loop
Yes No
movieQlty == "normal"
Yes No
qualityPrice ← 0 movieQlty == "3d"
Yes No
qualityPrice ← 4 movieQlty == "imax"
movieQlty ← "invalid"
Yes
movieQuality != "invalid"
No
Loop
Yes
(qtyAdult >= 0)||(qtyChild>=0)||(qtySenior>=0)
No
foodMenu()
snackSelect(totalSnackPrice)
foodCombo()
comboSelect(totalComboPrice)
Loop
"Do you want to addon? 99 - NO // 1 - Fries 2 - Sodas 3 - Nuggets 4 -Hotdogs ,5 - Chickens 6 - Meatballs : "GET snackAddon
Yes
snackAddon = 99
No
Yes No
(snackAddon ==1)||(snackAddon =2)||(snackAddon =3)
Yes No
addonPrice ← addonPrice + 3.00 (snackAddon =4)||(snackAddon =5)||(snackAddon =6)
Loop
No
intPromoCode(promocode, discount)
No
Yes No
(snackAddon ==1)||(snackAddon =2)||(snackAddon =3)
Yes No
addonPrice ← addonPrice + 3.00 (snackAddon =4)||(snackAddon =5)||(snackAddon =6)
Loop
Yes
(showtime != "10:00") || (showtime != "14:00") ||( showtime != "16:00") || (showtime != "18:00 ")|| (showtime != "21:00")
9
10
No
intPromoCode(promocode, discount) 9
10
"Are you a student? Y - Yes / N - No "GET student
Yes No
(student == "Y")||(student=="y")
specialDisc ← 5 specialDisc ← 0
Yes No
(oku == "Y")||(oku=="y")
specialDisc ← 5 specialDisc ← 0
Loop
Yes
confirmation == true
No
Yes No
paymentMethod == "A"
Yes No
"Enter your name :"GET name paymentMethod == "B"
confirmation ← true
"Enter your card pin ; "GET cardPin
confirmation ← true
Yes
selection == 1
No
customerCount ← customerCount + 1
Yes No
totalAmount > highest
highest ← totalAmount
Yes
totalAmount < lowest
No
11
lowest ← totalAmount
Yes No
enterPromo == promoCode
End
End
End
End
12
Food menu function
Start ()
PUT "C] 1x POPCORN (S), 2x SOFT DRINK or MINERAL WATER, 1x CHICKEN NUGGET (6PCS) : RM15.00"¶
PUT "7)HOT DOG (S) or (M)"¶ PUT "F] 1x HOT DOG, 1x SOFT DRINK or MINERAL WATER : RM7.50"¶
PUT "8)FRIES (S) or (M)"¶ PUT "G] 1x RED VELVET or CHOCOLATE POPCORN, 1x SOFT DRINK or MINERAL WATER : RM11.00"¶
End
End
13
Combo select function
comboPrice ← 0
comboQty ← 0
Loop
"Enter the letter of the combo A-H, (N) to stop "GET comboCode
Yes No
combo == "A"
Yes No
comboPrice ← comboPrice + 5.50 combo == "B"
Yes
comboCode == "N" || comboCode == "n"
No
End
14
Start (out totalSnackPrice) snackSelect function
snackCode ← 0
snackPrice ← 0
Yes No
snackCode = 1
Yes No
"What size do you want? (S) or (M) :"GET snackSize snackCode = 2
Yes No
snackSize == "S" Yes No
"What size do you want? (S) or (M) :"GET snackSize (snackCode = 3)||(snackCode = 4)
Yes No Yes No
snackPrice ← snackPrice + 3.50 snackSize = "M" snackSize == "S" Yes No
"What size do you want? (S) or (M) :"GET snackSize snackCode = 5
Yes No Yes No
snackPrice ← snackPrice + 4.50 PUT "Invalid Input"¶ snackPrice ← snackPrice + 4.50 snackSize = "M" snackSize == "S" Yes No
"What size do you want? (S) or (M) :"GET snackSize snackCode = 6
B
Yes No Yes No
snackPrice ← snackPrice + 5.50 PUT "Invalid Input"¶ snackPrice ← snackPrice + 7.50 snackSize = "M" snackSize == "S"
"What size do you want? (S) or (M) :"GET snackSize
Yes No Yes No
snackPrice ← snackPrice + 8.50 PUT "Invalid Input"¶ snackPrice ← snackPrice + 7.50 snackSize = "M" snackSize == "S"
"What size do you want? (S) or (M) :"GET s
Yes No Yes No
snackPrice ← snackPrice + 12.50 PUT "Invalid Input"¶ snackPrice ← snackPrice + 7.00 snackSize = "M" snackSize == "S"
snackPrice ←
C
totalSnackPrice ← totalSnackPrice + snackPrice
End
Yes
B
snackCode = 6
No
Yes No
(snackCode = 7)||(snackCode = 8)
Yes No
"What size do you want? (S) or (M) :"GET snackSize snackCode = 9
o Yes No
snackSize == "S" Yes No
"What size do you want? (S) or (M) :"GET snackSize snackCode = 10
Yes No Yes No
T "Invalid Input"¶ snackPrice ← snackPrice + 5.50 snackSize = "M" snackSize == "S" Yes No
snackPrice ← snackPrice + 2.50 (snackCode = 11)||(snackCode = 12)
Yes No
snackPrice ← snackPrice + 6.50 PUT "Invalid Input"¶ snackPrice ← snackPrice + 3.10 snackSize = "M" Yes No
"What do you want? (H) or (C) :"GET snackSize (snackCode = 13)||(snackCode = 14)||(snackCode = 15)
Yes No
snackPrice ← snackPrice + 3.50 PUT "Invalid Input"¶ snackSize == "H" Yes No
"What size do you want? (S) or (M) :"GET snackSize snackCode == 99
Yes No Yes No
snackPrice ← snackPrice + 3.50 snackSize = "C" snackSize == "H"
PUT "Invalid snack code"¶
Yes No
snackPrice ← snackPrice + 4.00 PUT "Invalid Input"¶ snackPrice ← snackPrice + 4.00 snackSize = "C"
3.2 Pseudocode
Start
16
num snackCode = 0
prompt "Enter the food and drink code you want 1 to 15"
while(snackCode!=99)
read snackCode
if snackCode == 1
prompt "what size do you want? (S) or (M) :"
13
do
read snackSize
if snackSize == 'S' Do
snackPrice += 3.50
else if snackSize == 'M' Do
snackPrice += 4.50
else display "Invalid Input",snackPrice
= -1
Endif
while(snackPrice != -1)
Endwhile
else if snackCode == 2
prompt "what size do you want? (S) or (M) :"
do
read snackSize
if snackSize == 'S' Do
snackPrice += 4.50
else if snackSize == 'M' Do
snackPrice += 5.50
else display "Invalid Input",snackPrice
= -1
Endif
while(snackPrice != -1)
Endwhile
else if snackCode == 3 || 4 Do
prompt "what size do you want? (S) or (M) :"
do
read snackSize
17
if snackSize == 'S' Do
snackPrice += 7.50
else if snackSize == 'M' Do
snackPrice += 8.50
else display "Invalid Input",snackPrice
= -1
14
Endif
while(snackPrice != -1)
Endwhile
else if snackCode == 5 Do
prompt "what size do you want? (S) or (M) :"
do
read snackSize
if snackSize == 'S' Do
snackPrice += 7.50
else if snackSize == 'M' Do
snackPrice += 12.50
else display "Invalid Input",snackPrice
= -1
Endif
while(snackPrice != -1)
Endwhile
else if snackCode == 6 Do
prompt "what size do you want? (S) or (M) :"
do
read snackSize
if snackSize == 'S' Do
snackPrice += 7.00
else if snackSize == 'M' Do
snackPrice += 8.00
else display "Invalid Input",snackPrice
= -1
Endif
while(snackPrice != -1)
18
Endwhile
else if snackCode == 7 || 8 Do
prompt "what size do you want? (S) or (M) :"
do
read snackSize
if snackSize == 'S' Do
snackPrice += 5.50
else if snackSize == 'M' Do
snackPrice += 6.50
else display "Invalid Input",snackPrice
= -1
Endif
while(snackPrice != -1)
Endwhile
else if snackCode == 9 Do
prompt "what size do you want? (S) or (M) :"
do
read snackSize
if snackSize == 'S' Do
snackPrice += 3.10
else if snackSize == 'M' Do
snackPrice += 3.50
else display "Invalid Input",snackSize =
'I'
Endif
while(snackSize != 'I')
Endwhile
else if snackCode == 10 Do
snackPrice += 2.50
else if snackCode == 11||12 Do
prompt "Do you want it Hot or Cold? (H) or
(C) :"
do
read snackSize
if snackSize == 'H' Do
19
snackPrice += 3.50
else if snackSize == 'C' Do
snackPrice += 4.00
else display "Invalid Input",snackPrice
= -1
Endif
while(snackPrice != -1)
Endwhile
else if snackCode == 13||14||15 Do
prompt "Do you want it Hot or Cold? (H) or
(C) :"
do
read snackSize
if snackSize == 'H' Do
snackPrice += 4.00
else if snackSize == 'C' Do+
snackPrice += 4.50
else display "Invalid Input",snackPrice
= -1
Endif
while(snackPrice != -1)
Endwhile
else
if(snackCode == 99)
break
else
display "Invalid Food Code"
Endif
Endif
prompt "Enter again or 99 to stop"
Endwhile
20
function comboSelect(totalComboPrice)
double comboPrice = 0;
int comboQty = 0
string comboCode = " "
while (comboPrice == -1 || comboCode != "N" || comboCode !=
"n")
prompt"\nEnter the letter of combo or (N) to stop : "
read comboCode
if comboCode == 'A' Then
comboPrice = 5.50
prompt "\nEnter quantity : "
read comboQty
else if comboCode == 'B' Then
comboPrice = 7.50
prompt "\nEnter quantity : "
read comboQty
else if comboCode == 'C' Then
comboPrice = 15.00
prompt "\nEnter quantity : "
read comboQty
else if comboCode == 'D' Then
comboPrice = 12.00
prompt "\nEnter quantity : "
read comboQty
else if comboCode == 'E' Then
comboPrice = 10.00
prompt "\nEnter quantity : "
read comboQty
else if comboCode == 'F' Then
comboPrice = 7.50
prompt "\nEnter quantity : "
read comboQty
else if comboCode == 'G' Then
21
comboPrice = 11.00
prompt "\nEnter quantity : "
read comboQty
else if comboCode == 'H' Then
comboPrice = 11.50
prompt "\nEnter quantity : "
read comboQty
else
if (comboCode == "N" || comboCode == "n")
break
else
Display "Invalid code!"
Endif
Endif
totalComboPrice = totalComboPrice + (comboPrice * comboQty)
return totalComboPrice
endfunction
22
function calcTotalAmount(ticketPrice,foodPrice,const tax)
double totalAmount
//Calculate tax
totalAmount = (ticketPrice + foodPrice) + ((ticketPrice +
foodPrice) * tax)
return totalAmount
endfunction
//function to display
function mainMenu()
Display "***************************************"
Display "Welcome Cinema Ticket Login System"
Display "***************************************"
endfunction
function foodMenu()
Display "\n PRICE LIST FOR
FOOD AND BEVERAGE
\n"
Display
"*==========================================================
==========================================================*\
n"
Display "FOOD & DRINKS\t\t\t\t\tPRICE\n"
Display
"*==========================================================
==========================================================*\
n"
Display "1) POPCORN ORIGINAL (S) or (M)\t\t\tRM3.50/RM4.50\
n"
Display "2) POPCORN CARAMEL (S) or (M)\t\t\tRM4.50/RM5.50\n"
Display "3) POPCORN RED VELVET (S) or (M)\t\tRM7.50/RM8.50\
n"
Display "4) POPCORN CHOCOLATE (S) or (M)\t\t\tRM7.50/RM8.50\
n"
Display "5) CHICKEN NUGGET (S) or (M)\t\t\tRM7.50/RM12.50\n"
Display "6) SAUSAGES (S) or (M)\t\t\t\tRM7.00/RM8.00\n"
Display "7) HOT DOG (S) or (M)\t\t\t\tRM5.50/RM6.50\n"
Display "8) FRIES (S) or (M)\t\t\t\tRM5.50/RM 6.50\n"
23
Display "9) SOFT DRINK (S) or (M)\t\t\tRM3.10/RM3.50\n"
Display "10) MINERAL WATER\t\t\t\tRM2.50\n"
Display "11) HOT/ICED TEA\t\t\t\tRM3.50/RM4.00\n"
Display "12) HOT/ICED LATTE\t\t\t\tRM3.50/RM4.00\n"
Display "13) HOT/ICED CHOCOLATE\t\t\t\tRM4.00/RM 4.50\n"
Display "14) HOT/COLD WHITE COFFEE\t\t\tRM4.00/RM 4.50\n"
Display "15) HOT/ICED MILO\t\t\t\tRM4.00/RM4.50\n"
Display
"*============================================================
========================================================*\n\n"
Display
"*==========================================================
==========================================================*\
n"
Display "COMBO SNACK\t\t\t\t\t\t\t\t\t\tPRICE\n"
Display
"*==========================================================
==========================================================*\
n"
Display "A] 1x POPCORN (M), 1x SOFT DRINK or MINERAL WATER\
t\t\t\t\tRM5.50\n"
Display "B] 1x POPCORN (L), 1x SOFT DRINK or MINERAL WATER\
t\t\t\t\tRM7.50\n"
Display "C] 1x POPCORN (S), 2x SOFT DRINK or MINERAL WATER,
1x CHICKEN NUGGET (6PCS)\t\tRM15.00\n"
Display "D] 1x POPCORN (S), 2x SOFT DRINK or MINERAL WATER,
1x HOTDOG\t\t\t\tRM12.00\n"
Display "E] 1x CHICKEN NUGGET (6PCS), 1x SOFT DRINK or
MINERAL WATER\t\t\t\tRM10.00\n"
Display "F] 1x HOT DOG, 1x SOFT DRINK or MINERAL WATER\t\t\
t\t\t\tRM7.50\n"
Display "G] 1x RED VELVET or CHOCOLATE POPCORN, 1x SOFT
DRINK or MINERAL WATER\t\t\tRM11.00\n"
Display "H] 1x SAUSAGES (8PCS), 1x SOFT DRINK or MINERAL
WATER\t\t\t\t\tRM11.50\n\n"
Display
"*==========================================================
==========================================================*\
n\n"
24
Display
"*=====================================================*\n"
Display"ADD-ONS\t\t\t\tPRICE\n"
Display
"*=====================================================*\n"
Display "1) FRIES (S)\t\t\tRM3.00 EACH\n"
Display "2) POPCORN IN A CUP\t" "\n"
Display "3) SAUSAGES (5PCS)\t" "\n"
Display
"-------------------------------------------------------\n"
Display "4) HOTDOG\t\t\tRM5.00 EACH\n"
Display "5) CHICKEN NUGGET (5PCS)\t" "\n"
Display "6) MEATBALLS (5PCS)\t" "\n"
Display
"*=====================================================*\n"
endfunction
//Main function
25
int answer;
bool check = false;
int programSelection = 0,selection = 0;
//Movie variable
string movie1 = "Interstellar", movie2 = "Oppenheimer", movie3
= "Sijjin", movie4 = "La La Land",
movieChoice,movieQlty,date,showTime;
int movieID, adultNum, childNum, seniorNum,qltyPrice;
int hall = 5,i = 0, o = 0;
//Admin variable
int adminOpt = 0,promocode = 0, movieChange, adminPass = 2005,
enteredCode = 0,customerCount = 0,totalTicket = 0;
double highest = 0, lowest = 100000, average = 0,totalSales = 0;
mainMenu()
Do
//registration login section
Do
prompt "Select one: 1.Register 2.Login 3.Admin"
26
read answer
if answer == 1 Then
do
registration(newUsername,newPassword)
username[i] = newUsername
password[i] = newPass
i++
display "Registration sucessful!'
answer = 2
while(answer == 1)
Endwhile
else if answer = 2 Then
while(check != true)
login(username,password)
for(o;o<100,o++)
if ((username == user[o]) && (pass ==
password[o])) Then
check = true
Endif
if(check != true)
"Incorrect username or password"
Endif
Endwhile
else if answer == 3
adminOpt = 0
while (adminOpt != 99)
prompt "Please enter the Admin Code : "
do
read enteredCode
if (enteredCode == adminPass)
Display
"****************************************
"
Display "\n\tWelcome to the Admin System"
27
Display "\
n****************************************
"
Display "\nCustomer count \t\t:" +
customerCount
Display"\nTotal Tickets Sold \t:" +
totalTicket
Display "\nTotal Sales today \t:RM" +
totalSales
Display "\nThe Average spending \t:RM" +
average
Display "\nThe Highest spending \t:RM" +
highest
Display "\nThe Lowest spending \t:RM" +
lowest
while (adminOpt != 99)
Display "\n\nWhat do you want to
do? \n1.Change promocode \n2.Change movie
available \n3.Change admin code \n99.Log
Out\n"
prompt adminOpt
if (adminOpt == 1)
28
Display "\nThe new
movie is : " << movie1
else if (movieChange == 2) {
29
if(check=true)
// Movie Menu selection section
//Main Menu
Display "You are logged in!\n\n\n\n";
// Movie 1
Display "1\t\t" << movie1 << "\t\tPG13\tNormal\t\tRM 21\
t\tRM 17\t\tRM 11\n"
Display "\t\t\t\t\t\tImax\t\t\t\t+ RM 4\n"
Display "\t\t\t\t\t\t3D\t\t\t\t+ RM 5\n\n"
// Movie 2
Display "2\t\t" << movie2 << "\t\tR18\tNormal\t\tRM 21\
t\t\t\tRM 11\n"
Display "\t\t\t\t\t\tImax\t\t\t\t+ RM 4\n"
Display "\t\t\t\t\t\t3D\t\t\t\t+ RM 5\n\n"
// Movie 3
Display "3\t\t" << movie3 << "\t\t\tR16\tNormal\t\tRM
21\t\t\t\tRM 11\n"
Display "\t\t\t\t\t\tImax\t\t\t\t+ RM 4\n"
Display "\t\t\t\t\t\t3D\t\t\t\t+ RM 5\n\n"
// Movie 4
30
Display "4\t\t" << movie4 << "\t\tPG13\tNormal\t\
tRM 21\t\tRM 17\t\tRM 11\n"
Display "\t\t\t\t\t\tImax\t\t\t\t+ RM 4\n"
Display "\t\t\t\t\t\t3D\t\t\t\t+ RM 5\n"
Display
"*=============================================================
================================================*\n\n"
//movieSelection
do
prompt "\nPlease type in the movie ID\t :"
read movieID
if movieID == 1 Do
movieChoice = movie1
else if movieID == 2 Do
movieChoice = movie2
else if movieID == 3 Do
movieChoice = movie3
else if movieID == 4 Do
movieChoice = movie4
else
display "Invalid movie choice",movieChoice =
"Invalid"
Endif
while(movieChoice == "Invalid")
Endwhile
31
else if movieQlty == "3D" Then
qualityPrice = 4
else if movieQlty == "IMAX" Then
qualityPrice = 5
else
"Incorrect movie quality types"
movieQlty = "Invalid"
Endif
while(movieQlty == "Invalid")
Endwhile
do
prompt "Enter the quantity of number of
adult,children and senior : "
read qtyAdult,qtyChild,qtySenior
if (adultNum >= 0) || (childNum >= 0) || (seniorNum
>= 0)) || ((adultNum + childNum + seniorNum <= 0))
display "\nTotal Ticket : " + adultNum +
childNum + seniorNum
display "\nAdult Ticket : " + adultNum + "\
nChild Ticket : " + childNum +"\nSenior Ticket
: " + seniorNum
else
adultNum = -1
display "Invalid Number of Person !"
Endif
while(adultNum == -1)
Endwhile
32
prompt "Do you want to addon? 99 - NO "
while snackAddon != 99
read addon
if snackAddon == 1||2||3 Then
addonPrice = 3.00
else if snackAddon == 4||5||6 Then
addonPrice = 5.00
else if (addon != 99)
display "invalid code"
addon = -1
read addon
Endif
Endwhile
if (!isValidDate(date))
cout << "\nInvalid date format or values!
Please enter a valid date.\n"
while (!isValidDate(date))
33
cout << "Invalid show time! \n Please try
again : "
showTime = "303"
Endif
while (showTime == "303")
double discount = 0
34
discountEvent = "Christmas Day"
else
discountEvent = "No Event Discount"
cout << "The date you given does not have special
discount."
Endif
//Discount Section
prompt "Enter a promo code if you have it : "
read promoCode
prompt "Are you a Student? Y - Yes / N - No"
read student
prompt "Are you a holder of OKU card? Y - Yes / N -
No"
read oku
if student == 'Y' then
specialDisc = 5
discountType = "Student"
else if oku == 'Y'
specialDisc = 0
discountType = "OKU"
else
specialDisc = 0
discountType = "NONE"
Endif
if promoCode == discountCode rhen
discount += 0.1
else
discount += 0
Endif
35
//Calculate ticket,food price
ticketPrice = (qtyAdult*(21+qualityPrice))+
(qtyChild*(17+qualityPrice))+
(qtySenior*(11+qualityPrice))
foodPrice = snackPrice + comboPrice + addon
//Calling Function to calculate totalAmount
totalAmount =
calcTotal(ticketPrice,foodPrice,specialDisc,discount
)
display "Your total price is :RM "
display totalAmount
//Payment selection
prompt "Select your payment method A - eWallet || B
- Debit/Credit Card"
While confirmation = false Do
read paymentMethod
if paymentMethod == A Then
prompt "Enter your name : "
read name
prompt "Enter your IC : "
read IC
prompt "Enter your wallet EWallet pin : "
read eWalletPin
confirmation = true
else if paymentMethod == B Then
prompt "Enter your name : "
read name
prompt "Enter your IC : "
read IC
prompt "Enter your card pin : "
read cardPin
prompt "Enter your card CVV : "
read cardCVV
prompt "Enter your card expiration date : "
read cardExpiration
36
confirmation = true
else
display “Incorrect Input “
Endif
Endwhile
//display ticket
display "\
n*************************************************\
n"
display "\nSelected Movie\t\t: " + movieChoice
display "\nMovie Quality\t\t: " + movieQlty
display "\nSelected Date\t\t: " + date
display "\nSelected Show Time\t: " + showTime
display "\nHall Number \t\t: " + hall
display "\nDiscount Type\t\t: " + discountType
display "\nEvent Special Discount\t: " +
discountEvent
display "\
n*************************************************\
n"
37
Display "\nTotal Ticket Price \t\t: RM" +
ticketPrice
Display "\nTotal Food & Beverage Price\t: RM" +
foodPrice
Display "\nTotal Price after tax(6% GST)\t: RM" +
totalAmount
Display "\nTotal Discount \t\t\t: RM"+ totalDiscount
Display "\nTotal Price After Discount \t: RM" +
totalPrice
Display "\
n*************************************************\
n"
38
do
cout << "\nDo you want to stop the program?\n1.Yes \n2.No\
n";
cin >> programSelection;
cout << "\n";
while (programSelection != 1 && programSelection != 2);
Endwhile
while(programSelection != 1)
end
39
4.0 Source Code
#include <iostream>
#include <iomanip>
#include <string>
#include <cstdlib>
#include <ctime>
using namespace std;
//function declaration
void registration(string& newUsername, string& newPassword);
void login(string& username, string& password);
double snackSelect(double totalSnackPrice);
double comboSelect(double totalComboPrice);
double calcTicketPrice(double qltyPrice, int adultNum, int childNum,
int seniorNum);
double calcFoodPrice(double totalSnackPrice, double
totalComboPrice,double totalAddonPrice);
double calcTotalAmount(double ticketPrice, double foodPrice, const
double tax);
double promoCode(double discountCode, int promocode);
void foodMenu();
bool isValidDate(const string& date);
int main(){
//Registration & Login variable
string newUsername,newPass, username, pass;
//Array Declaration
string user[100], password[100];
40
int answer;
bool check = false;
int programSelection = 0,selection = 0;
//Movie variable
string movie1 = "Interstellar", movie2 = "Oppenheimer", movie3
= "Sijjin", movie4 = "La La Land",
movieChoice,movieQlty,date,showTime;
int movieID, adultNum, childNum, seniorNum,qltyPrice;
int hall = 5,i = 0, o = 0;
//Admin variable
int adminOpt = 0,promocode = 0, movieChange, adminPass = 2005,
enteredCode = 0,customerCount = 0,totalTicket = 0;
double highest = 0, lowest = 100000, average = 0,totalSales =
0;
//Price variable
double totalAmount = 0, totalPrice = 0, ticketPrice = 0,
foodPrice = 0, specialDisc = 0, totalDiscount = 0, discount =
0;
41
cout <<
"*************************************************************
*****";
cout << "\n\t\tWelcome to Cinema Ticket Login System";
cout << "\
n*************************************************************
*****\n";
do {
//Registration & Login
newUsername = "", newPass = "", username = "", pass = "";
check = false;
do {
cout << "Select one : \n1.Register\n2.Login\
n3.Admin\n ";
cin >> answer;
if (answer == 1) {
do {
registration(newUsername, newPass);
user[i] = newUsername;
password[i] = newPass;
i++;
cout << "Registration sucessful!\n\n";
answer = 2;
} while (answer == 1);
}
else if (answer == 2) {
while (check != true) {
login(username, pass);
o = 0;
42
for (o; o < 100; o++)
if ((username == user[o]) && (pass
== password[o]))
{
check = true;
}
if (check != true) { cout << "\nincorrect
username or password"; }
}
}
else if (answer == 3) {
adminOpt = 0;
while (adminOpt != 99) {
cout << "Please enter the Admin Code : ";
do {
cin >> enteredCode;
if (enteredCode == adminPass) {
cout <<
"*****************************
***********";
43
cout << "\nThe Average
spending \t:RM" << average ;
44
cin >> movie1;
cout << "\nThe
new movie is :
" << movie1;
}
else if
(movieChange == 2)
{
cout << "\
nEnter the new
movie :";
cin >> movie2;
cout << "\nThe
new movie is :
" << movie2;
}
else if
(movieChange == 3)
{
cout << "\
nEnter the new
movie :";
cin >> movie3;
cout << "\nThe
new movie is :
" << movie3;
}
else if
(movieChange == 4)
{
cout << "\
nEnter the new
movie :";
cin >> movie4;
cout << "\nThe
new movie is :
" << movie4;
}
45
else if (adminOpt
== 3) {
cin >>
adminPass;
}
else { cout << "\
nWrong Input,enter
again !.\n"; }
}
}
}
else { cout << "Incorrect
Password !\n Enter Again : "; }
do {
if (check = true) {
//Main Menu
cout << "You are logged in!\n\n\n\n";
46
cout <<
"*===========================================
=============================================
====================*\n";
cout << " Movie Id\tMovie Title\
tClassification\tScreen quality\tPrice Adult\
tPrice Children\tPrice Senior/OKU \n";
cout <<
"=============================================
==============================================
==================\n";
// Movie 1
cout << "1\t\t" << movie1 <<
"\t\tPG13\tNormal\t\tRM 21\t\tRM 17\t\tRM 11\
n";
cout << "\t\t\t\t\t\tImax\t\t\t\t+ RM 4\n";
cout << "\t\t\t\t\t\t3D\t\t\t\t+ RM 5\n\n";
// Movie 2
cout << "2\t\t" << movie2 << "\t\tR18\tNormal\
t\tRM 21\t\t\t\tRM 11\n";
cout << "\t\t\t\t\t\tImax\t\t\t\t+ RM 4\n";
cout << "\t\t\t\t\t\t3D\t\t\t\t+ RM 5\n\n";
// Movie 3
cout << "3\t\t" << movie3 << "\t\t\tR16\
tNormal\t\tRM 21\t\t\t\tRM 11\n";
cout << "\t\t\t\t\t\tImax\t\t\t\t+ RM 4\n";
cout << "\t\t\t\t\t\t3D\t\t\t\t+ RM 5\n\n";
// Movie 4
cout << "4\t\t" << movie4 << "\t\tPG13\
tNormal\t\tRM 21\t\tRM 17\t\tRM 11\n";
cout << "\t\t\t\t\t\tImax\t\t\t\t+ RM 4\n";
cout << "\t\t\t\t\t\t3D\t\t\t\t+ RM 5\n";
47
cout <<
"*============================================
==============================================
===================*\n\n";
cout << endl;
//Movie Selection
do {
cout << "\nPlease type in the movie ID\
t : ";
cin >> movieID;
if (movieID == 1) {
movieChoice = movie1;
cout << "Your Choice is :" << movie1;
}
else if (movieID == 2) {
movieChoice = movie2;
cout << "Your Choice is :" <<
movie2;
}
else if (movieID == 3) {
movieChoice = movie3;
cout << "Your Choice is :" <<
movie3;
}
else if (movieID == 4) {
movieChoice = movie4;
cout << "Your Choice is :" <<
movie4;
}
else { movieID = 0 ; cout << "Invalid
Choice"; }
} while (movieID == 0);
48
srand(static_cast<unsigned
int>(std::time(0)));
hall = rand() % 5 + 1;
//Quality Selection
do {
cout << "\nPlease type in the movie
quality : ";
cin >> movieQlty;
if ((movieQlty == "Normal") || (movieQlty
== "normal")) {
qltyPrice = 0;
}
else if ((movieQlty == "3D") ||
(movieQlty == "3d")) {
qltyPrice = 4;
}
else if ((movieQlty == "IMAX") ||
(movieQlty == "imax") || (movieQlty ==
"Imax")) {
qltyPrice = 5;
}
else { movieQlty = "invalid"; cout <<
"Invalid Choice"; }
} while (movieQlty == "invalid");
do {
cout << "\nEnter the number of \nAdult :
";
cin >> adultNum;
cout << "\nChild : ";
cin >> childNum;
cout << "\nSenior : ";
cin >> seniorNum;
49
if (((adultNum >= 0) && (childNum >= 0)
&& (seniorNum >= 0)) && ((adultNum +
childNum + seniorNum >= 0))) {
cout << "\nTotal Ticket : " << adultNum +
childNum + seniorNum;
cout << "\nAdult Ticket : " << adultNum
<< "\nChild Ticket : " << childNum << "\
nSenior Ticket : " << seniorNum;
}
else { adultNum = -1; cout << "Invalid
Number of Person !"; }
} while (adultNum == -1);
//Combo Selection
totalComboPrice =
comboSelect(totalComboPrice);
//Addon Selection
cout << "\nDo you want to addon? Enter the
code or 99 for NO : ";
while (addon != 99) {
cin >> addon;
if (addon == 1 || addon == 2 || addon ==
3) {
addonPrice = 3.00;
}
else if (addon == 4 || addon == 5 ||
addon == 6) {
addonPrice = 5.00;
}
50
else{
cout << "Invalid addon code\n";
}
cout << "\nEnter Again or 99 to skip : ";
cin.clear();
cin.ignore(numeric_limits<streamsize>::ma
x(), '\n');
cin >> addon;
totalAddonPrice += addonPrice;
}
//Movie Date and Time Selection
do {
cout << "\nEnter the date. example(21/01)
: ";
cin >> date;
if (!isValidDate(date)) {
cout << "\nInvalid date format or
values! Please enter a valid date.\n";
}
} while (!isValidDate(date));
51
} while (showTime == "303");
double discount = 0;
52
else {
discountEvent = "No Event Discount";
cout << "The date you given does not have
special discount.";
}
//Promocode selection
cout << "\nEnter a promo code if you have it :
";
cin >> discountCode;
53
//Payment section
cout << "\nSelect your payment method [A-
eWallet || B- Debit/Credit Card]:";
while (confirmation == false ){
cin >> paymentMethod;
if (paymentMethod == 'A' || paymentMethod
== 'a')
{
cout << "\nEnter your name: ";
cin >> ws;
getline(cin, name);
cout << "\nEnter your IC: ";
cin >> ws;
getline(cin, ic);
cout << "\nEnter your eWallet pin:
";
cin >> eWalletPin;
confirmation = true;
}
else if (paymentMethod == 'B' ||
paymentMethod == 'b')
{
cout << "\nEnter your name\t: ";
cin >> ws;
getline(cin, name);
cout << "\nEnter your IC\t: ";
cin >> ws;
getline(cin, ic);
cout << "\nEnter your card pin\t:
";
cin >> cardPin;
cout << "\nEnter your card 3/4
Digit CVV\t: ";
54
cin >> cardCvv;
cout << "\nEnter your card
expiration date (DD/MM)\t: ";
cin >> cardExpiration;
confirmation = true;
}
else
{
cout << "\nIncorrect Input. Try
again.\n";
}
}
// Display the
selected movie, date, show time,
discounted prices, discount type,
and discount event
cout << "\
n*********************************************
****\n";
cout << "\nSelected Movie\t\t: " <<
movieChoice;
cout << "\nMovie Quality\t\t: " << movieQlty;
cout << "\nSelected Date\t\t: " << date;
cout << "\nSelected Show Time\t: " <<
showTime;
cout << "\nHall Number \t\t: " << hall;
cout << "\nDiscount Type\t\t: " <<
discountType;
cout << "\nEvent Special Discount\t: " <<
discountEvent;
cout << "\
n*********************************************
****\n";
55
foodPrice = calcFoodPrice(totalSnackPrice,
totalComboPrice, totalAddonPrice);
totalAmount = calcTotalAmount(ticketPrice,
foodPrice, tax);
totalDiscount = (totalAmount * discount) +
specialDisc;
totalPrice = totalAmount - totalDiscount;
56
if (totalPrice > highest) {
highest = totalPrice;
}
if (totalPrice < lowest) {
lowest = totalPrice;
}
totalSales = totalSales + totalPrice;
customerCount += 1;
average = totalSales / customerCount;
totalTicket = totalTicket + (adultNum + childNum +
seniorNum);
}
//Function
void registration(string& newUsername, string& newPassword) {
cout << "Enter your new name :";
cin >> ws;
getline(cin, username);
cout << "Enter your new password : ";
cin >> ws;
getline(cin, password);
57
}
void login(string& username, string& password) {
cout << "\nEnter your name :";
cin >> ws;
getline(cin, username);
cout << "\nEnter your password : ";
cin >> ws;
getline(cin, password);
}
58
}
else if (snackCode == 2) {
cout << "\nWhat size do you want (S)Small or
(M)Medium :";
do {
cin >> snackSize;
if ((snackSize == "s") || (snackSize == "S"))
{
snackPrice += 4.50;
}
else if ((snackSize == "m") || (snackSize ==
"M")) {
snackPrice += 5.50;
}
else { cout << "Invalid size !"; snackPrice =
-1; }
} while (snackPrice == -1);
}
else if (snackCode == 3 || snackCode == 4) {
cout << "\nWhat size do you want (S)Small or
(M)Medium :";
do {
cin >> snackSize;
if ((snackSize == "s") || (snackSize == "S"))
{
snackPrice += 7.50;
}
else if ((snackSize == "m") || (snackSize ==
"M")) {
snackPrice += 8.50;
}
else { cout << "Invalid size !"; snackPrice =
-1; }
} while (snackPrice == -1);
}
else if (snackCode == 5) {
59
cout << "\nWhat size do you want (S)Small or
(M)Medium :";
do {
cin >> snackSize;
if ((snackSize == "s") || (snackSize == "S"))
{
snackPrice += 7.50;
}
else if ((snackSize == "m") || (snackSize ==
"M")) {
snackPrice += 12.50;
}
else { cout << "Invalid size !"; snackPrice =
-1; }
} while (snackPrice == -1);
}
else if (snackCode == 6) {
cout << "\nWhat size do you want (S)Small or
(M)Medium :";
do {
cin >> snackSize;
if ((snackSize == "s") || (snackSize == "S"))
{
snackPrice += 7.0;
}
else if ((snackSize == "m") || (snackSize ==
"M")) {
snackPrice += 8.00;
}
else { cout << "Invalid size !"; snackPrice =
-1; }
} while (snackPrice == -1);
}
else if (snackCode == 7 || snackCode == 8) {
cout << "\nWhat size do you want (S)Small or
(M)Medium :";
60
do {
cin >> snackSize;
if ((snackSize == "s") || (snackSize == "S"))
{
snackPrice += 4.50;
}
else if ((snackSize == "m") || (snackSize
=="M")) {
snackPrice += 6.50;
}
else { cout << "Invalid size !"; snackPrice =
-1; }
} while (snackPrice == -1);
}
else if (snackCode == 9) {
cout << "\nWhat size do you want (S)Small or
(M)Medium :";
do {
cin >> snackSize;
if ((snackSize == "s") || (snackSize == "S"))
{
snackPrice += 3.10;
}
else if ((snackSize == "m") || (snackSize ==
"M")) {
snackPrice += 3.50;
}
else { cout << "Invalid size !"; snackPrice =
-1; }
} while (snackPrice == -1);
}
else if (snackCode == 10) {
snackPrice += 2.50;
}
else if (snackCode == 11 || snackCode == 12) {
61
cout << "\nDo you want (C)Cold or (H)Hot : ";
do {
cin >> snackSize;
if ((snackSize == "c") || (snackSize == "C"))
{
snackPrice += 3.50;
}
else if ((snackSize == "h") || (snackSize ==
"H")) {
snackPrice += 4.00;
}
else { cout << "Invalid choice !"; snackPrice
= -1; }
} while (snackPrice == -1);
}
else if (snackCode == 13 || snackCode == 14 || snackCode
== 15) {
cout << "\nDo you want (C)Cold or (H)Hot : ";
do {
cin >> snackSize;
if ((snackSize == "c") || (snackSize == "C"))
{
snackPrice += 4.00;
}
else if ((snackSize == "h") || (snackSize ==
"H")) {
snackPrice += 4.50;
}
else { cout << "Invalid choice !"; snackPrice
= -1; }
} while (snackPrice == -1);
}
else{
cout << "\nInvalid Food Code !\n ";
}
62
cout << "Enter again or 99 to stop : ";
cin.clear();
cin.ignore(numeric_limits<streamsize>::max(), '\n');
cin >> snackCode;
cout << "Enter again or 99 to stop : ";
}
totalSnackPrice = totalSnackPrice + snackPrice;
return totalSnackPrice;
}
double comboSelect(double totalComboPrice) {
double comboPrice = 0;
int comboQty = 0;
string comboCode = " ";
do {
cout << "\nEnter the letter of combo or (N) to stop : ";
cin >> comboCode;
if (comboCode == "A") {
comboPrice = 5.50;
cout << "\nEnter quantity : ";
cin >> comboQty;
}
else if (comboCode == "B" || comboCode == "F") {
comboPrice = 7.50;
cout << "\nEnter quantity : ";
cin >> comboQty;
}
else if (comboCode == "C") {
comboPrice = 15.00;
cout << "\nEnter quantity : ";
cin >> comboQty;
}
else if (comboCode == "D") {
comboPrice = 12.00;
63
cout << "\nEnter quantity : ";
cin >> comboQty;
}
else if (comboCode == "E") {
comboPrice = 10.00;
cout << "\nEnter quantity : ";
cin >> comboQty;
}
else if (comboCode == "G") {
comboPrice = 11.00;
}
else if (comboCode == "H") {
comboPrice = 11.50;
cout << "\nEnter quantity : ";
cin >> comboQty;
}
else{
if (comboCode == "N" || comboCode == "n") {
break;
}
else { cout << "Invalid code!"; }
}
} while (comboPrice == -1 || comboCode != "N" || comboCode !=
"n");
totalComboPrice = totalComboPrice + (comboPrice * comboQty);
return totalComboPrice;
}
double calcTicketPrice(double qltyPrice,int adultNum,int
childNum,int seniorNum){
double ticketPrice = 0;
ticketPrice = (adultNum*(21 + qltyPrice)) + (childNum * (17 +
qltyPrice)) + (seniorNum * (11 + qltyPrice));
return ticketPrice;
}
64
double calcFoodPrice(double totalSnackPrice, double
totalComboPrice,double totalAddonPrice) {
double totalFoodPrice = totalSnackPrice + totalComboPrice +
totalAddonPrice;
return totalFoodPrice;
}
double calcTotalAmount(double ticketPrice, double foodPrice,const
double tax) {
double totalAmount;
//Calculate tax
totalAmount = (ticketPrice + foodPrice) + ((ticketPrice +
foodPrice) * tax);
return totalAmount;
}
double promoCode(double discountCode,int promocode) {
if (discountCode == promocode) {
discount += 0.1;
}
else {
discount += 0;
}
return discount;
}
void foodMenu() {
cout << "\n PRICE LIST FOR
FOOD AND BEVERAGE \
n";
cout <<
"*============================================================
========================================================*\n";
cout << "FOOD & DRINKS\t\t\t\t\tPRICE\n";
cout <<
"*=============================================================
=======================================================*\n";
cout << "1) POPCORN ORIGINAL (S) or (M)\t\t\tRM3.50/RM4.50\n";
cout << "2) POPCORN CARAMEL (S) or (M)\t\t\tRM4.50/RM5.50\n";
65
cout << "3) POPCORN RED VELVET (S) or (M)\t\tRM7.50/RM8.50\n";
cout << "4) POPCORN CHOCOLATE (S) or (M)\t\t\tRM7.50/RM8.50\
n";
cout << "5) CHICKEN NUGGET (S) or (M)\t\t\tRM7.50/RM12.50\n";
cout << "6) SAUSAGES (S) or (M)\t\t\t\tRM7.00/RM8.00\n";
cout << "7) HOT DOG (S) or (M)\t\t\t\tRM5.50/RM6.50\n";
cout << "8) FRIES (S) or (M)\t\t\t\tRM5.50/RM 6.50\n";
cout << "9) SOFT DRINK (S) or (M)\t\t\tRM3.10/RM3.50\n";
cout << "10) MINERAL WATER\t\t\t\tRM2.50\n";
cout << "11) HOT/ICED TEA\t\t\t\tRM3.50/RM4.00\n";
cout << "12) HOT/ICED LATTE\t\t\t\tRM3.50/RM4.00\n";
cout << "13) HOT/ICED CHOCOLATE\t\t\t\tRM4.00/RM 4.50\n";
cout << "14) HOT/COLD WHITE COFFEE\t\t\tRM4.00/RM 4.50\n";
cout << "15) HOT/ICED MILO\t\t\t\tRM4.00/RM4.50\n";
cout <<
"*============================================================
========================================================*\n\
n";
cout <<
"*============================================================
========================================================*\n";
cout << "COMBO SNACK\t\t\t\t\t\t\t\t\t\tPRICE\n";
cout <<
"*============================================================
========================================================*\n";
cout << "A] 1x POPCORN (M), 1x SOFT DRINK or MINERAL WATER\t\
t\t\t\tRM5.50\n";
cout << "B] 1x POPCORN (L), 1x SOFT DRINK or MINERAL WATER\t\
t\t\t\tRM7.50\n";
cout << "C] 1x POPCORN (S), 2x SOFT DRINK or MINERAL WATER, 1x
CHICKEN NUGGET (6PCS)\t\tRM15.00\n";
cout << "D] 1x POPCORN (S), 2x SOFT DRINK or MINERAL WATER, 1x
HOTDOG\t\t\t\tRM12.00\n";
cout << "E] 1x CHICKEN NUGGET (6PCS), 1x SOFT DRINK or MINERAL
WATER\t\t\t\tRM10.00\n";
cout << "F] 1x HOT DOG, 1x SOFT DRINK or MINERAL WATER\t\t\t\
t\t\tRM7.50\n";
66
cout << "G] 1x RED VELVET or CHOCOLATE POPCORN, 1x SOFT DRINK
or MINERAL WATER\t\t\tRM11.00\n";
cout << "H] 1x SAUSAGES (8PCS), 1x SOFT DRINK or MINERAL
WATER\t\t\t\t\tRM11.50\n\n";
cout <<
"*=============================================================
=======================================================*\n\n";
cout <<
"*=====================================================*\n";
cout << "ADD-ONS\t\t\t\tPRICE\n";
cout <<
"*=====================================================*\n";
cout << "1) FRIES (S)\t\t\tRM3.00 EACH\n";
cout << "2) POPCORN IN A CUP\t" "\n";
cout << "3) SAUSAGES (5PCS)\t" "\n";
cout <<
"-------------------------------------------------------\n";
cout << "4) HOTDOG\t\t\tRM5.00 EACH\n";
cout << "5) CHICKEN NUGGET (5PCS)\t" "\n";
cout << "6) MEATBALLS (5PCS)\t" "\n";
cout <<
"*=====================================================*\n";
}
67
if (day < 1 || day > 31 || month < 1 || month > 12) {
return false;
}
return true;
}
68
At first , our program will ask user to register or login to enter to our system . If they are
admin , they can choose number 3 . The sample of output shows that if user enter 1
(Register) as their choice .
This is the example if user enter 2 (Login) after the registration succeed.
69
This is the example if user enter 3 (Admin) . To access the admin tools , users need key in
the admin code . This admin tools are use for the cinema admin to change promocode ,
movies and more .
2. Movie Selection
Back to our main program , the program will ask user to choose their Movie and movie
quality based on the movie table given . Then , the program will ask user to enter the
number of adult , child and senior to confirm their amount of ticket .
70
3. Food Selection
After that , the program will ask user to choose their Food and Snack . We provide Food and
Snack table to gave users choices .
Then , the program will ask user to choose their date . Some date are program as certain
special promo based on our special celebrations such as Chinese New Year , Deepavali ,
Christmas and so on . For users who have a promo code , a student or OKU , they will get a
special discount too . After that , user can choose either they want to pay with E-Wallet or
Credit/Debit Card .
71
5. Receipt ( Ticket and Total Price )
Lastly , the program will display the official receipt for customer . It will include the total price
for ticket , food and beverage and total price after tax . Also , the customer’s selected movie ,
movie quality , selected date and showtime are also shown on receipt .
6.0 Discussion/Conclusion
This system started by display choices to user as if they want to make a new account
that are carried by the registration function or log in to the ticketing system by login function.
They are required to enter their name and create a password for their account. After get
through the registration part, users will be displayed all the movies list along with the ticket
prices based on the categories (adult, children, senior or OKU) and the screen quality
(normal, Imax or 3D). Users are needed to enter their movie selection, screen quality and
quantity of the tickets. After that, users will also be displayed the foods and beverages list
along with its price and sizes by the foodMenu function. While the snackSelect function
required the users to make choices for the food and drinks followed by the selection of the
combo snack that are carried by the comboSelect function and the price of the food selected
will be calculated by the function calcFoodPrice. In addition, discounts are applied by any
special occasion or student or special promo code. Lastly, for the payment, users are given
two choices which either by using e-Wallet or debit\credit card. The total prices of all the
selection made by the consumers will be calculated in the function named calcTotalAmount.
In conclusion, the problems that arose with the previous old system were resolved by
our system. The time it takes for one individual to buy cinema tickets will be reduced by this
system. Hence, the waiting time has been reduced significantly. The new system may have
a high initial cost, but its ongoing operating and maintenance costs will be significantly
cheaper, bringing down the total cost. The automated system has also reduced the amount
of human resources needed to operate it. Additionally, consumers will be able to buy tickets
easily and without any difficulties of spoken transactions partly due to the system's output
screen. Last but not least, the absence of a cashier to conduct transactions will minimise the
amount of work.
72