0

I am going to be taking a programing class next semester and I all ready have the book for the class, I am tring to figure things out to get a jump on the class and I have a couple of questions .... I need to come up with a pseudocode and hierarchy chart for the following problem but I dont know how to start it out or what it should look like ... If anyone could help me out with understanding this problem, it would help me out alot .... thanks !!! :)

Develop the logic for a program that gives you the following menu options:

(1) Hot dog 1.50
(2) Fries 1.00
(3) Lemonade .75
(4) End order

You should be allowed to keep ordering from the menu until you press 4 for End order, at which point you should see a total amount due for your entire order.

1
Contributor
2
Replies
3
Views
9 Years
Discussion Span
Last Post by MMill2373
0

This is what I have came up with so far from what i have read, can anyone tell me if this is correct ?? I am stuck on the hierarchy chart now ....

start
perform housekeeping()
while response not equal to quitValue
perform mainLoop()
endwhile
perform finishUp()
stop

housekeeping()
declare variables
open files
perform displayMenu()
return

displayMenu()
print “1. HotDog: $1.50”
print “2. Fries: $1.00”
print “3. Lemonade: $0.75”
print “4. End of Order”
print “Please press a number to make a selection”
read response
return

mainLoop()
case based on response
case 1
perform hotDog()
case 2
perform fries()
case 3
perform lemonade()
case 4
perform endOfOrder()
default
print “Sorry. Invalid Entry.”
endcase
perform displayMenu()
returnstart
perform housekeeping()
while response not equal to quitValue
perform mainLoop()
endwhile
perform finishUp()
stop

housekeeping()
declare variables
open files
perform displayMenu()
return

displayMenu()
print “1. HotDog: $1.50”
print “2. Fries: $1.00”
print “3. Lemonade: $0.75”
print “4. End of Order”
print “Please press a number to make a selection”
read response
return

mainLoop()
case based on response
case 1
perform hotDog()
case 2
perform fries()
case 3
perform lemonade()
case 4
perform endOfOrder()
default
print “Sorry. Invalid Entry.”
endcase
perform displayMenu()
return

0

Can someone give me a hand with getting this hierarchy chart started ??

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.