CSC 121 PROJECT Final
CSC 121 PROJECT Final
MARA
(PROJECT NAME)
MOHD SHAFARIN(2023862888)
MAC – AUGUST 2023
2. MUHAMMAD IRSYAD
RAMLI(2023478798)
DATE : 30/12/2023
3
TABLE OF CONTENTS
1.0 INTRODUCTION................................................................................................................3
2.0 OBJECTIVE........................................................................................................................3
4.0 SOLUTION.........................................................................................................................3
4.1 Pseudocode....................................................................................................................3
4.2 Flowchart.........................................................................................................................3
5.0 DISCUSSION......................................................................................................................3
6.0 CONCLUSION....................................................................................................................3
7.0 REFERENCES...................................................................................................................4
APPENDIX....................................................................................................................................5
We are designing a system that aims to help user to book their movie ticket faster and
easier. With this system, they are able to book a ticket no matter where they are without having
to que physically at a movie theater, they also can buy food and beverages beforehand and just
collect them at the movie theater. This system will make booking ticket more efficient and
easier; the admin can also track the number of customers and how much they have spent. Our
main motivation come from queuing too long to get a movie ticket, so our team brainstorm an
idea to mitigate this issue and this what we have come up with.
2.0 OBJECTIVE
INPUT
To obtain user input for username, password, movie choices and food choices
• CALCULATE
To calculate all the total of 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.
• AVERAGE
To find the average spending of each customer
• HIGHEST AND LOWEST
To find the highest and lowest amount of spending for one user
• OUTPUT
To output the total amount that need to be paid
3
3.0 PROBLEM ANALYSIS
INPUT
start
accountType
loginType
username
userPassword
adminPassword
adminSelection
discountCode
specialDisc
movieAvailable
movieSelection
movieQuality
movieDate
movieTime
qtyAdult
qtyChild
qtySenior
snackCombo
qtyCombo
snackAddon
promoCode
paymentMethod
name
IC
eWalletPin
cardPin
cardCVV
PROCESS
cardExpiration
OUTPUT
totalSales
totalCustomer
totalPrice
movie
movieDate
movieTime
seatPos
snackCombo
addon
averageSpen
4.0 SOLUTION
The control structures that is used in this solution is sequential, selection, and repetition.
Sequential is mainly used for variable declaration and some calculation while selection is
used for starting the program, registration and goods and services available in the
solution, depending on the selection, it will then calculate or goes to a different prompt.
Repetition is also used in conjunction with selection so it would repeat the input if the
user entered incorrectly or chooses too, for example a user entered a password
incorrectly or they want to start the program again.
Function is also incorporate into the solution, the type of function is pass by value, pass
by references, returning and non-returning. Pass by value function is used to calculate
total price by combining all the goods selected. Pass by references is used to prompt
userto enter their username and password and output it to main function. Returning
function are used to determine user goods selection and outputting the prices. Non-
Returning function is for displaying the menu and movie showings.
4.1 Pseudocode
4.2 Flowchart
accountType ← 0
customerCount ← 0
totalSales ← 0
totalTicket ← 0
start ← 0
movieID ← 0
qtyAdult ← 0
qtyChild ← 0
qtySenior ← 0
qltyPrice ← 0
ticketPrice ← 0
foodPrice ← 0
promoCode ← 2005
codeChange ← 0
specialDisc ← 0
discount ← 0
qualityPrice ← 0
comboPrice ← 0
totalComboPrice ← 0
qtyCombo ← 0
snackPrice ← 0
totalSnackPrice ← 0
snackAddon ← 0
addon ← 0
addonPrice ← 0
totalAmount ← 0
ic ← " "
eWalletPin ← 0
cardPin ← 0
cardCVV ← 0
cardExpiration ← 0
confirmation ← false
adminPass ← admin123
highest ← 0
lowest ← 10000
voidMenu()
Loop
Yes
start = 2
No
Loop
Yes
accountType != 1 && accountType != 3
No
Yes No
accountType == 1
username ← newUsername
"Enter the admin password :"GET enterAdmin
Yes No
codeChange == 1
Loop
Yes
((enterUsername==username)&&(enterPass==password))
No
Loop
Yes No
movieID = 1
Yes No
movieChoice ← "Interstellar" movieID = 2
Yes No
movieChoice ← "Oppenheimer" movieID = 3
Yes No
movieChoice ← "Sijjin" movieID = 4
"Please select movie quality normal/3d/imax"GET movieQuality
Yes No
movieQuality == "normal"
Yes No
qualityPrice ← 0 movieQuality == "3d"
Yes No
qualityPrice ← 4 movieQuality == "imax"
Yes
movieQuality != " "
No
Loop
Yes
(qtyAdult >= 0)||(qtyChild>=0)||(qtySenior>=0)
No
"Do you want to add Foods and Beverages? Y-Yes /N- No"GET snackChoice
Loop
Yes
snackChoice == "N"
No
voidFoodMenu()
doubleFNB(snackPrice)
"Do you want to add Foods and Beverages again? Y/N"GET snackChoice
voidFoodCombo()
Loop
Yes
comboChoice = "N"
No
doubleCombo(comboPrice)
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)
intPromoCode(promocode, discount)
Yes No
(student == "Y")||(oku=="Y")
specialDisc ← 5 specialDisc ← 0
ticketPrice ← (qtyAdult * (21 + qualityPrice)) + (qtyChild * (17 + qualityPrice)) + (qtySenior * (11 + qualityPrice))
Yes No
totalAmount > highest
highest ← totalAmount
Yes No
totalAmount < lowest
lowest ← totalAmount
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
customerCount ← customerCount + 1
End
Start ()
Start ()
End
PUT "D] 1x POPCORN (S), 2x SOFT DRINK or MINERAL WATER, 1x HOTDOG : RM12.00"¶
PUT "E] 1x CHICKEN NUGGET (6PCS), 1x SOFT DRINK or MINERAL WATER : RM10.00"¶
Function FoodMenu() PUT "F] 1x HOT DOG, 1x SOFT DRINK or MINERAL WATER : RM7.50"¶
PUT "G] 1x RED VELVET or CHOCOLATE POPCORN, 1x SOFT DRINK or MINERAL WATER : RM11.00"¶
Start () PUT "H] 1x SAUSAGES (8PCS), 1x SOFT DRINK or MINERAL WATER : RM11.50"¶
End
Yes No
enterPromo == promoCode
End
End
Function doubleFNB()
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
Yes No Yes No
snackPrice ← snackPrice + 5.50 PUT "Invalid Input"¶ snackPrice ← snackPrice + 7.50 snackSize = "M" snackSize == "S" Yes No
"What size do you want? (S) or (M) :"GET snackSize (snackCode = 7)||(snackCode = 8)
Yes No Yes No
snackPrice ← snackPrice + 8.50 PUT "Invalid Input"¶ snackPrice ← snackPrice + 7.50 snackSize = "M" snackSize == "S" Yes No
"What size do you want? (S) or (M) :"GET snackSize snackCode = 9
Yes No Yes No
snackPrice ← snackPrice + 12.50 PUT "Invalid Input"¶ snackPrice ← snackPrice + 7.00 snackSize = "M" snackSize == "S" Yes No
"What size do you want? (S) or (M) :"GET snackSize snackCode = 10
Yes No Yes No
snackPrice ← snackPrice + 8.00 PUT "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"
"What size do you want? (S) or (M) :"GET snackSize PUT "Invalid snack code"¶
Yes No Yes No
snackPrice ← snackPrice + 3.50 snackSize = "C" snackSize == "H"
Yes No
snackPrice ← snackPrice + 4.00 PUT "Invalid Input"¶ snackPrice ← snackPrice + 4.00 snackSize = "C"
comboPrice ← 0
Yes No
combo == "A"
Yes No
comboPrice ← comboPrice + 5.50 combo == "B"
Yes No
comboPrice ← comboPrice + 7.50 combo == "C"
Yes No
comboPrice ← comboPrice + 15.00 combo = "D"
Yes No
comboPrice ← comboPrice + 12.00 combo == "E"
Yes No
comboPrice ← comboPrice + 10.00 combo == "F"
Yes No
comboPrice ← comboPrice + 7.50 combo == "G"
Yes No
comboPrice ← comboPrice + 11.00 combo == "H"
End
Payment Input
Food and Combo Menu Output
Admin output
5.0 DISCUSSION
This solution manages incorporate sequential control structure in its design. Also,
selection control structure for movie choice, food and drink and payment section. One-
way, two-way, multi-way and nested If are used in the selection. Next, repetition is also
used to make sure redundancy when user input incorrectly or repeat when the user
wants and this is done by using do while and while loop. Next, Function is also used
mainly to calculate and pass parameter such as total price. Non-returning function is
also used to display or output food menu and homepage and lastly pass by reference
function is used to prompt user to enter their username and password and pass the data
to main function. This solution also does calculation such as summation to calculate total
price, find the average spending of customer and find the highest and lowest spending of
each customer
Some improvement can be implemented into the solution. Firstly, the solution
only offered 4 different movie which is too few of a movie, this should be increased to 8
or more so user can have more selection of movie to picks. Secondly, the type of movie
or food and beverage cannot be changed, this can be improved by making a new code
that allow admin to changes these things. Lastly, the solution does not allow the user to
choose their seat, this should be improved by making the user be able to see seat that
are already booked and seat that is vacant.
6.0 CONCLUSION
7.0 REFERENCES
programming/function
Compiler. https://pseudocode.deepjain.com/guides/functions/
APPENDIX
SCORING RUBRICS (REPORT)
No
Attributes Sub-attribute Poor Fair Good Excellent Weight
Submission Marks
0 1 2 3 4
No Poor use of white White space makes Good use of white Excellent use of
Submission space (indentation, program fairly easy to space. white space.
blank lines). read.
Sufficiently organized Creatively organized
Disorganized and Partially organized work. work.
Pseudocode Readability 3
messy. work.
Good use of variables Excellent use of
Poor use of variables Fairly use of variables and control structures. variables control
and control and control structures.
structures. structures.
3
No Does not present any Executes with some Executes without errors. Executes without
Submission due to errors. errors. errors.
User prompts are
User prompts are User prompts contain understandable, Excellent user
misleading or non- little information, poor minimum use of symbols prompts, good use
existent. design. or spacing in output. of symbols or
Algorithm Logic spacing in output 2
No testing has been Some testing has Some testing has been (neatly displayed).
completed. been completed. completed and present
appropiate solution. Testing has been
completed and
present appropiate
solution.
Formatting No formatting Poor report formatting Fairly good report Good report formatting. Excellent report
with unorganized formatting. formatting. Follow
content. the documentation
References are included. format with an
Major grammatical appropriate
error. References aprroiate 1
arrangement and
to the requirement
fulfilled
No references Minor grammatical error.
requirements.
included.
Documentation/
Project Report
Algorithm No Poor explanation of Fairly good Good explanation of Excellent
(Pseudocode Submission algorithm which does explanation of algorithm based on explanation of
& Flowchart) not reflex the problem algorithm based on problem statement and algorithm based on 1
statement and problem statement solving. problem statement
solving. and solving. and solving.
Discussion & No Unrelated discussion Fairly good Good and logical Well thought-out and
Conclusion Submission and conclusion discussion and discussion and logical discussion 1
conclusion conclusion and conclusion.
TOTAL
52
0 1 2 3 4
Presentation Three or more of the Two of the presenters One presenter didn't All presenters knew 2
Skills presenters didn't didn't know the know the information the information and
know the information information and got lost and they got lost often. progressed
and got lost often. often. Diction and voice Diction and voice level smoothly through
No Presentation
Diction and voice level made listening made listening difficult the presentation.
level made listening difficult. Role playing from for the audience. Diction and voice
difficult. Role playing distracted audience Role playing distracted level engaged the
distracted audience attention from the audience attention audience in the
attention from the presentation from presentation. presentation. Role
presentation playing enhanced
the information and
TOTAL
48