DECLARE category, choice,
START DISPLAY screen1 (Title DISPLAY screen2 (Burger
quantity, invalidChoice, loop
Screen, Group Choice, Sandwich Choices,
itemPrice, totalPrice,
Members) Cola Choices, Juice Choices)
payment, change
itemPrice = Subroutine
getItemPrice(catergory, SCAN (category, choice) PRINT (“Enter your choice: “)
choice) getItemPrice
PRINT (“Item Price: totalPrice = itemPrice *
PRINT (“Enter Quantity: “) SCAN (quantity)
itemPrice”) quantity
PRINT (“Enter payment PRINT (“Total Price:
SCAN (payment)
amount: “ totalPrice”)
MAIN FLOWCHART MAIN FLOWCHART
Page 2
Page 2
TRUE FALSE
Print (“insufficient
Payment. Please pay the If (payment change = payment -
correct amount.”) < totalPrice) totalPrice
PRINT (“Would you like
PRINT (“Change:
SCAN (choice) to place another order?
change”)
(Y/N): ”
TRUE
If (choice = loop
‘Y’ or ‘y’)
FALSE
MAIN FLOWCHART
PRINT (“Thank you for STOP
ordering!”
DEFAULT GETITEMPRICE SUBROUTINE PROCESS
CASE B / b CASE S / s CASE C / c CASE J / j
PRINT (“You PRINT (“You have
PRINT (“Invalid
Burger Choice have selected selected Chicken
Burger Choice.”
CASE 1 BeefDECLARE
Burger.”) CASE 2 Burger.”) GETITEMPRICE SUBROUTINE PROCESS
getItemPrice Switch DEFAULT
getItemPrice PRINT (“Invalid
(category, choice) Case:
Category, Exiting the
price = 35.00 price = 25.00 Program.”)
declare price = 0.0 Category
CASE 1 CASE 2 CASE 3 DEFAULT
PRINT (“You PRINT (“You PRINT (“You have PRINT (“Invalid
Sandwich Choice have selected have selected selected Ham Sandwich
Tuna Sandwich”) Egg Sandwich”) Sandwich”) Choice”)
Burger Sandwich Cola Juice
price = 20.00 price = 20.00 price = 35.00
STOP
CASE 1 CASE 2 CASE 3 DEFAULT
PRINT (“You PRINT (“You PRINT (“You
PRINT (“Invalid
have selected have selected have selected
Switch Switch Cola Choice”)
Cola Choice 7UP”) Coke”) Switch
Royal”) Switch
Case: Case: Case: Case:
Choice Choice Choice Choice
price = 15.00 price = 15.00 price = 15.00
CASE 1 CASE 2 CASE 3 DEFAULT
PRINT (“You have PRINT (“You have PRINT (“You have PRINT (“Invalid
Burger Choice selected 7UP”) Sandwich selected
Choice Coke”) selected Cola
Royal”)
Choice Cola Choice”) Juice Choice
Juice Choice
price = 15.00 price = 15.00 price = 15.00