Question: Discuss how you would convert a program with ten menu options to one that uses submenus. Use the following example. The program has the following

Discuss how you would convert a program with ten menu options to one that uses submenus. Use the following example. The program has the following options to beging with:
1.Process a sale
2.Process a return
3.Add a record to the inventory file
4.Search for a record in the inventory file
5.Modify a record in the inventory file
6.Delete a record in the inventory file
7.Print an inventory list report
8.Print a list of inventory items by cost
9.Print a list of inventory items by age
10.Print a list of inventory items by retail value
We want to turn this into a program that presents 4 submenus as follows:
1- Main Menu
a.Process a Sale or a Return
b.Update the Inventory File
c.Print an Inventory Report
d.Exit the Program
2- Sales and Returns Menu
a.Process a Sale
b.Process a Return
c.Go Back to the Main Menu
3- Update Inventory File Menu
a.Add a Record
b.Search for a Record
c.Modify a Record
d.Delete a Record
e.Go Back to the Main Menu
4- Inventory Report Menu
a.Print an inventory list report
b.Print a list of inventory items by cost
c.Print a list of inventory items by age
d.Print a list of inventory items by retail value
e.Go Back to the Main Menu
Needless to say, you do not need to implement each method. For the innermost methods, just add a comment stating "Code for xxxxxxx". You need to have a main module, and modules for menu and submenu items. Inside the submenu items you can just put in a comment.Please write simple pseudocode without specifying any language.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!