0% found this document useful (0 votes)
38 views21 pages

CSC 121 PROJECT Final

csc 121 uitm project final

Uploaded by

xxaimeenshafiq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views21 pages

CSC 121 PROJECT Final

csc 121 uitm project final

Uploaded by

xxaimeenshafiq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

UNIVERSITI TEKNOLOGI

MARA

TEAM MEMBERS : PROJECT


1. MUHAMMAD AIMEEN SHAFIQ BIN
PROPOSAL REPORT

(PROJECT NAME)
MOHD SHAFARIN(2023862888)
MAC – AUGUST 2023
2. MUHAMMAD IRSYAD
RAMLI(2023478798)

3. GIENA QHALILLA BINTI


MOHD.HAFIDZ(2023467036)

CLASS GROUP : JCDCS1101D

DATE : 30/12/2023

LECTURER : ABDUL MALIK MOHD RICK

3
TABLE OF CONTENTS

1.0 INTRODUCTION................................................................................................................3

2.0 OBJECTIVE........................................................................................................................3

3.0 PROBLEM ANALYSIS.......................................................................................................3

4.0 SOLUTION.........................................................................................................................3

4.1 Pseudocode....................................................................................................................3

4.2 Flowchart.........................................................................................................................3

4.3 Sample of Expected Output............................................................................................3

5.0 DISCUSSION......................................................................................................................3

6.0 CONCLUSION....................................................................................................................3

7.0 REFERENCES...................................................................................................................4

APPENDIX....................................................................................................................................5

SCORING RUBRICS (REPORT)..................................................................................................5

SCORING RUBRICS (PRESENTATION).....................................................................................7


1.0 INTRODUCTION

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

Function main() Start

username ← " "

password ← " "

enterUsername ← " "

enterPass ← " "

newUsername ← " "

newPassword ← " "

accountType ← 0

customerCount ← 0

totalSales ← 0

totalTicket ← 0

start ← 0

movieID ← 0

movieQuality ← " "

movieTime ← " "

date ← " "

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

snackChoice ← " "

comboChoice ← " "

snackPrice ← 0

totalSnackPrice ← 0

snackAddon ← 0

addon ← 0

addonPrice ← 0

totalAmount ← 0

name ← " "

ic ← " "

eWalletPin ← 0

cardPin ← 0

cardCVV ← 0

cardExpiration ← 0

paymentMethod ← " "

confirmation ← false

adminPass ← admin123

highest ← 0

lowest ← 10000

voidMenu()

Loop

"Enter : 1.Start 2.Stop"GET start

Yes
start = 2

No

Loop

"Select one: 1.Register 2.Login 3.Admin" GET accountType

Yes
accountType != 1 && accountType != 3
No

Yes No
accountType == 1

voidRefNewUsername(newUsername, newPassword) Loop

username ← newUsername
"Enter the admin password :"GET enterAdmin

password ← newPassword Yes


enterAdmin == adminPass
No

PUT "you can login now"¶


PUT "Invalid try again"¶

PUT "Hello Admin"¶

PUT "Total site visitor today :"+customerCount¶

PUT "Total sales today is :RM"+totalSales¶

PUT "Total ticket sold today is :"+totalTicket¶

PUT "The average spending is: RM"+totalSales/customerCount¶

PUT "The highest customer spent : RM"+highest¶

PUT "The lowest customer spent :RM"+lowest¶

"Do you want to change promo code? 1.Yes / 2.No"GET codeChange

Yes No
codeChange == 1

"Enter the new promoCode : "GET promoCode

Loop

"Enter your username :"GET enterUsername

"Enter your password"GET enterPass

Yes
((enterUsername==username)&&(enterPass==password))
No

PUT "wrong password"¶

Loop

"Please select a movie you want to watch : 1.Interstellar/2.Oppenheimer/3.Sijjin/4.La la Land"GET movieID

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"

qualityPrice ← 5 PUT "Incorrect movie type"¶

Yes
movieQuality != " "

No

"Please type a date : (dd/mm)"GET date

"Please pick a time 1000/1500/1900/2100 : )"GET movieTime

Loop

"Enter number of adult : "GET qtyAdult

"Enter number of child : "GET qtyChild

"Enter number of senior ; "GET qtySenior

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)

totalSnackPrice ← totalSnackPrice + snackPrice

"Do you want to add Foods and Beverages again? Y/N"GET snackChoice

"Do you want to add or buy combo? Y-Yes / N-No"GET comboPick

voidFoodCombo()

Loop

Yes
comboChoice = "N"
No

doubleCombo(comboPrice)

"Enter the quantity :"GET qtyCombo

totalComboPrice ← comboPrice * qtyCombo

"Do you want to add or buy combo again?"GET comboChoice

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)

addonPrice ← addonPrice + 5.00

intPromoCode(promocode, discount)

"Are you a student? Y - Yes / N - No "GET student

"Are you a holder of OKU card? Y - Yes / N - No"GET oku

Yes No
(student == "Y")||(oku=="Y")

specialDisc ← 5 specialDisc ← 0

ticketPrice ← (qtyAdult * (21 + qualityPrice)) + (qtyChild * (17 + qualityPrice)) + (qtySenior * (11 + qualityPrice))

foodPrice ← snackPrice + totalComboPrice + addonPrice

doubleTotalAmount(ticketPrice, foodPrice, specialDisc, discount, totalAmount)

PUT "Your total price is: RM"+totalAmount¶

Yes No
totalAmount > highest

highest ← totalAmount

Yes No
totalAmount < lowest

lowest ← totalAmount

"Select your payment method A-eWallet,B - Debit/Credit"GET paymentMethod

Loop

Yes
confirmation = true
No

Yes No
paymentMethod == "A"

Yes No
"Enter your name :"GET name paymentMethod == "B"

"Enter your IC : "GET ic


"Enter your name :"GET name

"Enter your eWallet Pin : "GET eWalletPin


"Enter your IC : "GET ic

confirmation ← true
"Enter your card pin ; "GET cardPin

"Enter your card CVV : "GET cardCVV

"Enter your card expiration date ; "GET cardExpiration

confirmation ← true

customerCount ← customerCount + 1

totalSales ← totalSales + totalAmount

totalTicket ← qtyAdult + qtyChild + qtySenior

PUT "Your booking was successful"¶

PUT "Your movis is : "+movieChoice¶

PUT "Your movie quality is : "+movieQuality¶

PUT "Your movie date is : "+date¶

PUT "Your movie time is : "+movieTime¶

End

function voidMenu() function FoodCombo()

Start ()
Start ()

PUT "A] 1x POPCORN (M), 1x SOFT DRINK or MINERAL WATER :RM5.50"¶


PUT "Welcome to Cinema Ticket Login System"¶

PUT "B] 1x POPCORN (L), 1x SOFT DRINK or MINERAL WATER : RM7.50"¶

PUT "Select one : 1.Start 2.Stop"¶


PUT "C] 1x POPCORN (S), 2x SOFT DRINK or MINERAL WATER, 1x CHICKEN NUGGET (6PCS) : RM15.00"¶

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"¶

PUT "Cinema Food and Beverages Menu"¶ End

PUT "1)POPCORN ORIGINAL (S) or (M)"¶

PUT "2)POPCORN CARAMEL (S) or (M)"¶

PUT "3)POPCORN RED VELVET (S) or (M)"¶


PUT "4)POPCORN CHOCOLATE (S) or (M)"¶

PUT "5)CHICKEN NUGGET (S) or (M)"¶

PUT "6)SAUSAGES (S) or (M)"¶

PUT "7)HOT DOG (S) or (M)"¶

PUT "8)FRIES (S) or (M)"¶

PUT "9)SOFT DRINK (S) or (M)"¶

PUT "10)MINERAL WATER"¶

PUT "11)HOT/ICED TEA"¶


Function intPromoCode()
PUT "12)HOT/ICED LATTE"¶

PUT "13)HOT/ICED CHOCOLATE"¶ Start (in promoCode, out discount)

PUT "14)HOT/COLD WHITE COFFEE"¶


enterPromo ← " "

PUT "15)HOT/ICED MILO"¶


"Enter a promo code if you have it :"GET enterPromo

End
Yes No
enterPromo == promoCode

discount ← 0.1 discount ← 0

End

Function doubleTotalAmount() Function voidRefNewUsername

Start (in out newUsername, in out newPassword)

Start (in ticketPrice, in foodPrice, in specialDisc, in discount, out totalAmount)

"Enter your new username :"GET newUsername

totalAmount ← ((ticketPrice + foodPrice) - ((ticketPrice + foodPrice) * discount)) - specialDisc

"Enter your new password : "GET newPassword


End

End

Function doubleFNB()

Start (out snackPrice)

snackPrice ← 0

"Enter food and drink code, 1 to 15 :"GET snackCode

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"

snackPrice ← snackPrice + 4.50 PUT "Invalid Input"¶


Function doubleCombo

Start (out comboPrice)

comboPrice ← 0

combo ← " "

"Enter the snack combo you want A / B / C / D / E / F / G / H "GET combo

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"

comboPrice ← comboPrice + 11.50 PUT "Invalid Code"¶

End

4.3 Sample of Expected Output

Registration input Movie input


Date Input Combo Input

Student/OKU status input

Payment Input
Food and Combo Menu Output

Customer ticket and total price 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

This solution is achievable in programming C++ as it uses pre-existing structures


such as sequential, selection, repetition, and function. The solution has also been made
first using IPO table and then translated to pseudocode and flowchart, this will ease up
the coding to be written in C++ as the indentation, variable, structure is already drawn
and wrote in the pseudocode and flowchart.
This algorithm manages to solves the main problem of our project which is
making booking ticket easier and faster. User can login to their existing account and buy
ticket at the quantity of their liking for the movie, food and beverage that is offered and
pay online. They will then get their digital ticket showing time and dates of the movie.
This algorithm makes the calculation instantaneous. Admin can also access this system
and see the site visitor count, ticket sold, average spending, highest lowest spending of
each customer and the total sales made.

7.0 REFERENCES

 Pseudocode Editor Online - app. (n.d.). https://pseudoeditor.com/app

 C++ Function (With examples). (n.d.). https://www.programiz.com/cpp-

programming/function

 Jain, D. (n.d.). Pseudocode - Functions Guide. Online Pseudocode Editor &

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.

No The flowchart is The flowchart is The flowchart is fairly The flowchart is


Submission poorly organized and readable only by easy to read. exceptionally well
very difficult to read. someone who knows organized and very
what it is supposed to The flowchart shapes easy to follow.
Flowchart Readability The flowchart shapes be doing. are sufficiently presented 3
are wrongly The flowchart
presented The flowchart shapes shapes are well
are partial wrongly presented
presented

No A difficult and A logical solution, Solution is efficient and Solution is efficient,


Submission inefficient solution. easy to follow but not easy to follow (i.e. no easy to understand
the most efficient. confusing tricks). and maintain.
Does not included
required control Partially or does not Included required control Included required
structures. include required structures. control structures.
Algorithm Efficiency control structures. 2
The algorithm was Fits a reasonable length Fits a reasonable
lengthy The algorithm was of algorithm. length of algorithm.
lengthy.

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

SCORING RUBRICS (PRESENTATION)

Attributes Sub-attribute No Submission Poor Fair Good Excellent Weight Marks

0 1 2 3 4

Presentation No Presentation There are no errors


There are a few errors
There are many There are some errors in spelling,
in spelling, grammar,
errors in spelling, in spelling, grammar, grammar, and
and punctuation.
grammar, and and punctuation. punctuation.
punctuation.
Bullet format is not
Readability of Bullet format is not Bullets are
consistent on a few 2
the Slides Bullet format is not consistent on some consistent and clear.
slides.
consistent or clear. slides.
Too much information
Too much information Too much information Information is clear
on less than five
on many slides. on some slides. and concise on each
slides.
slide.

No Presentation Background makes


Appealing graphic
the slides hard to
Graphic elements are elements are
read. There are too few
included sufficiently. included
Graphics are graphic elements.
Overall visual Only one slides is hard appropriately. Slides
confusing and not Appropriate 2
Appeal to read and movement are easy to read and
related to words. background. Some
and sounds are used movement and
Too much movement slides hard to read.
quite effectively. sounds are used
in the slides. Many
effectively.
slides hard to read.

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

held the audience


attention.

Information and Presents findings with Presents findings in


Presents findings in an
Organization graphics are some degree of an organized and 2
No Presentation organized manner
disorganized organization conclusive manner

Does not perform


Perform assigned Perform assigned Perform assigned
assigned tasks Perform assigned tasks
Work tasks within the scope tasks within the scope tasks beyond the
within the scope of within the scope of work 2
Responsibility of work with close of work and exceeds scope of work and
work even with and meet expectations
supervision expectations beyond expectations
close supervision

Ethics & Has a Has a less Has a well-


Professionalism disharmonious harmonious Has a satisfactory Has a good acknowledged
relationship with co- relationship with co- relationship with co- relationship with co- relationship with co-
workers and within workers and within workers and within workers and within workers and within
Work Relation institution, work, 2
institution, work, institution, work, groups institution,work, groups institution, work,
groups and groups and and community when at and community when groups and
community when at community when at work at work community when at
work work work

TOTAL
48

You might also like