Professional Documents
Culture Documents
Final Report - Hijjaz Western Restaurant Management
Final Report - Hijjaz Western Restaurant Management
Date Submitted: 1 0 0 7 2 0 2 1
1
Table of Contents
2
EXECUTIVE SUMMARY
PROJECT TITLE
PROJECT BACKGROUND
In Hijjaz Western Restaurant, we applied the same concept as popular fast-food franchise that
origins from United States of America, Mc Donald, where the self-order system, where
customer input their order by themselves by using machines. Our staff, may help them to
assist on doing so. If the customer is first timers, we have already included the tutorial on how
to order by themselves at the beginning of the program. Customer may choose to not watch
the tutorial by input value other than 0. The first question that we ask from the customer is
their details like name and number of their seated tables. Next, we will first ask the customer
for its membership. If the customer said yes(Y), the customer will be given special discount
for members only by 15%. If No(N) is the answer, there will be not given any discount as it
only referred to only members. There are total of 4 types of main menus or dishes or it can be
also referred as packages (package A, package B, package C and package D) where in every
package, there is a main dish, desert, salads, and also a beverage.
Customer will choose their preferred package and its quantity. For example, customer want
to order three set of package A, thus, the user will input 3 (value) for package A. The input
value entered by user is representing the quantity ordered by the customer. The quantity of
ordered received will be multiplied by packages’ price. The given formula is used,
total=package*price. Next, the customer will be asked if they want to have another package,
if the customer want to do so, input ‘Y’ which indicates as Yes. Meanwhile, if customer wish
to not to order another package, the customer may input ‘N’ which indicates No. This question
will be asked until the customer input ‘N’ which indicates no to the question whether they want
to add another package.
Moreover, there are also add-ons items, where additional items such as rice, coke, plain water
and ice cream will be displayed in this category. First, the customer will be asked whether they
want any add-ons items. If they answer No(N) they will display straight to the bills, which is
the final step of this display. Else, if they answer Yes(Y), they will be asked what add on items
they want either rice(R), coke (C), plain water (P) and ice cream (I). Next, they will be asked
to put the quantity of their chosen items. Then once again, they will be asked if they want to
order another add on items, and the concept is the same as looping system in package where
customer may input ‘Y’ for yes to the question and ‘N’ for no for adding another add on items.
Moving on to the next subject, display of receipt. The receipt will first display their details that
the customer already filled early on. Then, it will display what package and what items for add-
on category that customers ordered. There is total of 4 price that need to be checked and
added for the total Overall, which is the total price that the customer need to pay. First is the
subtotal, the total of all the unit or items price multiply by the quantity ordered. SST is referring
to the service tax which is 8% of the subtotal. Next is discount price, this section is referred to
the 15% discount that members can received. If the customer is not the member of Hijjaz
Western Restaurant, no discount will be received. Lastly, the totalOverall which is the total
3
price that customer need to pay. This results from adding up the subtotal and SST, while
deduct discount received by the customer. Thus, produce the totalOverall.
Next, step is proceeding to the next customer. If the input is yes, the system will restart the
program to refresh for the next customer. Meanwhile, if No is the answer, it will show the total
amount of customer for the day, the total package ordered by category A, B, C and D. Only
staff is allowed to input N or no, because it will show the Hijjaz Western Restaurant total
achievement for the day.
OBJECTIVE
PROJECT MENU
4
PSEUDOCODE
1) Function randomOrderCode()
1. Start
2. Get random number
3. Set range (000000-999999)
4. return Code
5. End
2) Function packageMenu()
1. Start
2. Display “LIST OF PACKAGE”
3. End
3) Function addOnMenu()
1. Start
2. Display "LIST OF ADD-ONS”
3. End
4) Function DisplayMenu(time)
1. Start
2. Display “WELCOME TO HIJJAZ(JAWI)
3. Display “HIJJAZ WESTERN RESTAURANT OPENING EVERYDAY, EVERYTIME,
EVERYWHERE”
4. Display Menu
5. End
5) Function tutorial()
1. Start
2. Display tutorial
3. End
6) Function MemberCard(Member)
1. Start
2. if (Member == ‘Y’ || Member == ‘y’)
Display “YOU WILL RECEIVED 15% DISCOUNT!”
else if (Member == ‘N’ || Member == ‘n’)
Display “ITS OKAY, WE’LL PROCEED TO YOUR ORDER 😊”
else
Display “INVALID CHOICE, PLEASE TRY AGAIN”
3. End
7) Function memberDiscount(Member)
1. Start
2. if (Member == ‘Y’ || Member == ‘y’)
return 0.15
else
return 0
3. End
5
8) Function traceAddOn(AddOn)
1. Start
2. Set ADDON [] = {‘R’, ‘C’, ‘P’, ‘I’}
Set addon [] = {‘r’, ‘c’, ‘p’, ‘i’}
3. i=0
4. while (i<5)
if (AddOn == ADDON[i] || AddOn == addon[i])
temp=i
endwhile
i=i+1
5. return temp
6. End
6
14) Function errorPackage(resetCounter, PackageOrder[], quantityPackageOrder[],
addPackage[])
1. Start
2. i=0
3. while(i<resetCounter)
Display “PLEASE ENTER YOUR PACKAGE : “
Display “PLEASE ENTER THE QUANTITY : “
Display “DO YOU WANT TO ADD ANOTHER PACKAGE? (Y/N) : “
endwhile
i=i+1
4. End
7
17) Function Main
1. Start
do
Display “If you’re first-timer, simply type 0 to watch tutorial!”
Display “Answer: ”
Get option
if (option == 0)
Call Function tutorial()
else
Reset screen
Call Function Display Menu(time)
Display “PLEASE ENTER YOUR NICKNAME : “
Get name
Display “PLEASE ENTER YOUR TABLE NO. :”
Get table
while(true)
Display “ARE YOU A MEMBER? (Y/N) : “
Get Member
if (Member != 'Y' && Member != 'y' && Member != 'N' && Member !=
'n')
call Function displayError()
call Function DisplayMenu(time)
call Function errorName(name, table)
else
call Function MemberCard(Member)
endwhile
while(true)
while(true)
Display “PLEASE ENTER YOUR PACKAGE: “
Get Package
If (Package!='A' && Package!='a' && Package!='B' &&
Package!='b' && Package!='C' && Package!='c' &&
Package!='D' && Package!='d' )
call Function displayError()
call Function DisplayMenu(time)
call Function errorName(name, table)
call Function errorMember(Member)
call Function packageMenu()
call Function errorPackage(resetCounter, PackageOrder[],
quantityPackageOrder[], addPackage[])
else
PackageOrder[PackageCounter]= Package
PackageCounter++
endwhile
Get quantity
8
quantityPackageOrder[quantityPackageCounter]=quantity
quantityPackageCounter++
if (Package=='A' || Package=='a')
dayA=dayA+quantity
dayB=dayB+quantity
dayC=dayC+quantity
dayD=dayD+quantity
while (true)
Get Choice
else
resetCounter++
addPackage[addPackageCounter]=Choice
addPackageCounter++
endwhile
continuewhile
9
else if (Choice == ‘N’ || Choice == ‘n’)
resetCounter=0;
endwhile
while (true)
Get Choice
else
endwhile
do
while (true)
Get addon
i=0
while (i<AddOnCounter)
10
Display “PLEASE ENTER YOUR ADD-
ON :”
else
AllAddOn[AddOnCounter] = addon
AddOnCounter++
singlePriceAddOn[priceAddcounter]=singleAdd
OnPrice(traceAddOn(addon))
priceAddcounter++
endwhile
Get quantityAddOn
addOnquantity[addCounter]=quantityAddOn
addCounter++
Calculate
totalAdd = totalAdd +
totalAddOn(traceAddOn(addon),quantityAddOn)
while (true)
Get AnotherChoice
i=0
while (i<AddOnCounter)
11
Display ‘PLEASE ENTER YOUR ADD-
ON:“
if (i<resetCounter)
else
anotherAddOn[test]=AnotherChoice
test++
resetCounter++
endwhile
i=0
while (i<Packagecounter)
j=0
while (j<4)
if(PackageOrder[i]==userPackageUp[j]||PackageOrder[i]==use
rPackageLow[j])
alpha[i]=userPackageUp[j]
if (alpha[i]=='A')
Aa=Aa+quantityPackageOrder[i]
check[0]=true
else if (alpha[i]=='B')
Bb=Bb+quantityPackageOrder[i]
check[1]=true
else if (alpha[i]=='C')
Cc=Cc+quantityPackageOrder[i]
check[2]=true
else if (alpha[i]=='D')
12
Dd=Dd+quantityPackageOrder[i]
check[3]=true
finalquantity[0]=Aa
finalquantity[1]=Bb
finalquantity[2]=Cc
finalquantity[3]=Dd
i=0
while (i<4)
if (check[i])
PackageOrder[j]=arrletter[i]
quantityPackageOrder[j]=finalquantity[i]
singlePriceArray[j]=pricePackage[i]
j++
i=0
while (i<AddOnCounter)
if (AllAddOn[i]=='R' || AllAddOn[i]=='r')
displayAddOn[i]="RICE"
displayAddOn[i]="COKE"
displayAddOn[i]="PLAIN WATER"
displayAddOn[i]="ICE CREAM"
Display name
Display randomOrderCode()
Display table
Display “QUANTITY”
Display “PACKAGE”
13
Display “UNIT PRICE”
Display “TOTAL”
i=0
while (i<j)
Display quantityPackageOrder[i]
Display PackageOrder[i]
Display singlePriceArray[i]
Calculate singlePriceArray[i]*quantityPackageOrder[i]
Calculate subtotal=subtotal+singlePriceArray[i]*quantityPackageOrder[i]
if (AddCounter != 0)
Display “ADD-ON”
i=0
Display addOnquantity
Display displayAddOn[i]
Display singlePriceAddOn[i]
Calculate singlePriceAddOn[i]*addOnquantity[i]
Calculate sst=0.08*subtotal
Calculate totalOverall=sst+subtotal-subtotal*memberDiscount(Member)
Display subtotal
Display sst
Display subtotal*memberDiscount(Member)
Display totalOverall
Get nextchoice[8]
customercount++
14
2. Display Order Data
i. customercount
ii. dayA
iii. dayB
iv. dayC
v. dayD
3. End
15
FLOWCHART
1) Function randomOrderCode()
Start
Return Code
End
2) Function packageMenu()
Start
End
3) Function addOnMenu()
Start
End
16
4) Function DisplayMenu(time)
Start
Display Menu
End
5) Function tutorial()
Start
Display tutorial
End
6) Function MemberCard(Member)
Start
End
17
7) Function memberDiscount(Member)
Start
Y
If(Member == ‘Y’ || return 0.15
Member == ‘y’)
return 0
End
8) Function traceAddOn(AddOn)
Start
i=0
N
while (i < 5)
If(AddOn == ADDON[i] Y
temp = i
|| AddOn == addon[i] )
N return temp
i=i+1 break
End
18
9) Function totalAddOn(temp, quantity)
Start
return priceADDON[temp]*quantity
End
Start
return priceADDON[temp]
End
Start
End
19
12) Function errorMember(member)
Start
End
Start
End
i=0
N
while (i < resetCounter)
i=i+1
End
20
15) Function addAnotherPackage(resetCounter, PackageOrder[], quantityPackageOrder[],
addPackage, PackageCounter)
Start
i=0
N
while (i < PackageCounter)
N
(i < resetCounter)
i=i+1
End
Start
End
21
17) Function main
Start
Display “Answer: ”
Get option
Y
If( option == 0) Call Function tutorial()
Reset screen
Get name
Get table
while (true)
Get member
break
k a
22
k a
while (true)
while (true)
Get Package
N
Call Function errorName (name, table)
PackageOrder[PackageCounter]= Package
Call Function errorMember (Member)
break
Get Quantity
quantityPackageOrder[quantityPackageCounter]=quantity
quantityPackageCounter ++
k n b
23
b
k n
if(Package == ‘A’ Y
dayA = dayA+quantity
|| Package == ‘a’)
if(Package == ‘B’ Y
dayB = dayB+quantity
|| Package == ‘b’)
if(Package == ‘C’ Y
dayC = dayC+quantity
|| Package == ‘c’)
Y
if(Package == ‘D’ dayD = dayD+quantity
|| Package == ‘d’)
while (true)
Get Choice
resetCounter++
Call Function errorName (name, table)
addPackage[addPackageCounter]=Choice
Call Function
addPackageCounter ++ addAnotherPackage(resetCounter,
PackageOrder,quantityPackageOr
der,addPackage,PackageCounter)
k n c
24
c
k n
break
Y
continue if (Choice == ‘Y’ ||
Choice == ‘y’)
Y
resetCounter = 0 if (Choice == ‘N’
|| Choice == ‘n’)
break
while (true)
Get Choice
if (Choice == ‘Y’ ||
Call Function DisplayMenu(time)
Choice == ‘y’)
k d
25
d
k
while (true)
Get addon
i=0
AddOnCounter ++
while (i <
AddOnCounter)
singlePriceAddOn[priceAddcounter]=si
ngleAddOnPrice(traceAddOn(addon)
priceAddCounter ++
Get quantityAddOn
addOnquantity[addCounter]=quantityAddOn
k m e
26
e
k m
addCounter ++
while (true)
Get AnotherChoice
if (AnotherChoice!='Y'
&& AnotherChoice!='y' Y
Call function displayError()
&&AnotherChoice!='N'
&&AnotherChoice!='n')
anotherAddOn[test]=AnotherChoice
Call function addOnMenu()
test++
i=0
resetCounter ++
while (i <
AddOnCounter)
N
if ( i< resetCounter)
break
Display “DO YOU WANT TO ADD
ANOTHER ADD ON? (Y/N) : ”
k f i = i+1
m
27
m f
k
while (AnotherChoice!='N'
&& AnotherChoice!='n')
i=0
while (i<Packagecounter)
j=0
while (i<4)
if(PackageOrder[i]==userPackageUp[j]||
PackageOrder[i]==userPackageLow[j]
alpha[i]=userPackageUp[j]
Y
if (alpha[i]=='A') Aa=Aa+quantityPackageOrder[i] Check[0] = true
Y
if (alpha[i]=='B') Bb=Bb+quantityPackageOrder[i] Check[1] = true
Y
if (alpha[i]=='C') Cc=Cc+quantityPackageOrder[i] Check[2] = true
Y
if (alpha[i]=='D') Dd=Dd+quantityPackageOrder[i] Check[3] = true
finalquantity[0]=Aa
k g
28
g
k
finalquantity[1]=Bb
finalquantity[2]=Cc
finalquantity[3]=Dd
i=0
while (i<4)
if (check[i])
PackageOrder[ j ]=arrletter[i]
quantityPackageOrder[ j ]=finalquantity[i]
singlePriceArray[ j ]=pricePackage[i]
j++
i=0
while (i<AddOnCounter)
k h
29
k h
if (AllAddOn[i]=='R' Y
displayAddOn[i]="RICE"
|| AllAddOn[i]=='r')
if (AllAddOn[i]=='C' Y
|| AllAddOn[i]=='c') displayAddOn[i]="COKE"
if (AllAddOn[i]=='P' Y
displayAddOn[i]="PLAIN WATER"
|| AllAddOn[i]=='p)
if (AllAddOn[i]=='I' Y displayAddOn[i]="ICECREAM"
|| AllAddOn[i]=='i')
Display name
Display randomOrderCode()
Display table
Display “QUANTITY”
Display “PACKAGE”
Display “TOTAL”
k
i
30
i
k
i=0
while (i<j)
Display quantityPackageOrder[i]
Display PackageOrder[i]
Display singlePriceArray[i]
singlePriceArray[i]*quantityPackageOrder[i]
subtotal=subtotal+singlePriceArray[i]*quantityPackageOrder[i]
if (AddCounter != 0)
Display “ADD-ON”
i=0
Display addOnquantity
Display displayAddOn[i]
Display singlePriceAddOn[i]
singlePriceAddOn[i]*addOnquantity[i]
k j
31
k j
sst=0.08*subtotal
totalOverall=sst+subtotal-subtotal*memberDiscount(Member)
Display subtotal
Display sst
Display subtotal*memberDiscount(Member)
Display totalOverall
Get nextchoice[8]
customercount++
Y while (nextchoice[8]
!='N'&& nextchoice[8] !='n')
Display customercount
Display dayA
Display dayB
Display dayC
Display dayD
End
32
LIST OF CODES
1. List of functions
33
quantityPackageOrder[],char when error reset occur during quantityPackageOrder[],char
addPackage[]) the second codes for package. addPackage[])
34
2. List of Repetition in Main
1 Do while loop 369 Proceed to the next customer or display the total order by
package and to display the total customer ordered for the day.
528 To loop the inside loop if customers want to add another add-
on items.
2 While loop 410 To loop whenever wrong codes aside from Y and N being input
occur. Reset back the question for membership.
430 To loop the loop inside it if customer choose to add another
package. It will show the same question to input the codes and
quantity back.
432 To reset the loop if wrong codes aside from (A, B, C, D) being
the input. Reset back to ask the customer which package do
they want to order.
474 To loop whenever wrong codes aside from Y and N being input
occur. Reset back the question whether customer want to add
another package.
506 To loop whenever wrong codes aside from Y and N being input
occur. Reset back the question for asking whether customers
want add-on items.
563 To loop whenever wrong codes aside from Y and N being input
occur. Reset back the question for customers whether to add
another add-on items.
3 For loop main 539 To loop back previous input after the reset question from
putting the wrong codes for the add-on items.
573 To loop back previous input after the reset question from
putting the wrong codes for asking whether customers want to
add another the add-on items.
595 To check the sequence of ordered package recorded and
display correctly (A, B, C, D)
597 To check if user put lower case when ordering to be the same
as upper case. (Package)
629 To display package order on receipt if exist
639 To check if user put lower case when ordering to be the same
as upper case, with the correct sequence. (add-on)
35
673 If Plain water or Ice cream order, the space will be different.
Mainly to make the receipt more organised and neater.
4 For loop in 41 The loop is function when another customer came in and thus
function definition produce another customer order code differently.
114 To make animation when Hijjaz Western Restaurant quotes
appeared on screen
149 To make animation and delay during tutorial (name)
36
DETAILS INPUT AND OUTPUT
INPUT OUTPUT
• option • AllAddOn
• name • fullADDON
• table • addOnquantity
• Member • anotherAddOn
• Package • quantityPackageOrder
• quantity • PackageOrder
• Choice • singlePriceArray
• addon • displayAddOn
• quantityAddOn • singlePriceAddOn
• AnotherChoice • subtotal
• nextchoice • sst
• totalOverall
• customercount
• dayA
• dayB
• dayC
• dayD
37
SCREEN LAYOUT
38
3. Output display list of package code
39
5. Output display loading animation
40
REFERENCES
Hubbard, J. R. (2000). Schaum's Outlines, Programming with C++, Second Edition. The McGraw-Hills
Companies.
Malik, D. (2013). C++ Programming: From Problem Analysis to Program Design, Sixth Edition. Boston:
Cengage Learning.
Malik, D. (2017). C++ Programming, Program Design including Data Structures. Boston: Cengage
Learning.
Quick and Creative Western Menu. (n.d.). Retrieved from Unilever Food Solutions:
https://www.unileverfoodsolutions.com.my/en/chef-inspiration/knorr-for-western-food-
menu/quick-and-creative-western-menu.html
41