Tuesday 15 July 2014

Help with nested menus C

Posted by Саша 08:59, under | No comments


Help with nested menus? C++? Help with nested menus? C++?

I can't figure out how to nest menus or return to the main menu from a nested menu. I wrote some pseudocode that shows what it needs to do. Any help would be appreciated, even if it's just pseudcode in return. Thanks!

Main menu:
1. Add a Shape
2. Delete a Shape
3. Display total number of Shapes
4. Display all Shapes
5. Quit

+choice 1:
1. Add a Rectangle
2. Add a Square
3. Add a Triangle
4. Add a diamond
5. Cancel

-choice 1a:
rect.getData()
-choice 2a:
sqr.getData()
-choice 3a:
tri.getData()
-choice 4a:
di.getData()
-choice 5a:
return to main menu

+choice 2:
1. List of shapes to delete
...
5. Cancel

-choice 1 - ...b:
deleteShape()
return to main menu
-choice 5b:
return to main menu

+choice 3:
getNumShapes()
return to main menu

+choice 4:
displayAll()
return to main menu

+choice 5:
Terminate program


Other Answers:













0 коммент.:

Post a Comment