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.

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.