Starting Out with Programming Logic and Design (4th Edition)
4th Edition
ISBN: 9780133985078
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 11, Problem 5MC
A multiple-level menu will display a “submenu”, when a user makes a selection.
Hence, the correct answer is option “C”.
Program Plan Intro
Menus:
A menu-driven
- The list of actions, which is displayed on the screen is referred as menu.
- This program will ask the user to enter the selection using keyboard, which displays a character such as a letter or a number that resides next to each menu options.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
When a menu item’s __________ property equals True, a check mark appears on the menu next to the item’s text.
Please only the appropriate option without explanation and quickly
Menu of the Day
Create a program that filters and displays the correct menu items based on the day that the user enters.
Console
Menu of the Day
COMMAND MENU
Specify the day using the three-letter format (mon, tue, wed, thu, fri, sat, sun). Or, enter 'exit' to exit.
Day: mon
Roast beef 10
Potato soup 6
Baked cod 10
Day: tue
Butter chicken 11
Lamb tikka 12
German forest cake 7
Day: exit
Bye!
Specifications
A tab-delimited text file named menu.txt that contains the menu items for the current week is attached. Each item has a name (a string), price (an integer), and associated day (a string)
Use a structure named MenuItem to store the name, price, and day for each menu item.
When the program starts, it should load the items from the file into a vector of MenuItem objects.
The user should be able to type a three-letter day code to display the menu items for the specified day.
The user should be able to…
Chapter 11 Solutions
Starting Out with Programming Logic and Design (4th Edition)
Ch. 11.1 - What is a menu-driven program?Ch. 11.1 - The items displayed in a menu are often preceded...Ch. 11.1 - What type of structure do you use in a program to...Ch. 11.3 - Explain why most menu-driven programs use a loop...Ch. 11.3 - If a program uses a loop to display a menu...Ch. 11.4 - Prob. 11.6CPCh. 11.4 - Prob. 11.7CPCh. 11.4 - When a program has a lot of items for the user to...Ch. 11 - Prob. 1MCCh. 11 - Prob. 2MC
Ch. 11 - If a menu-driven program uses a loop to redisplay...Ch. 11 - A program that uses a multiple-level menu displays...Ch. 11 - Prob. 5MCCh. 11 - When the user selects an operation from a...Ch. 11 - When the user selects an operation from a(n)...Ch. 11 - Prob. 1TFCh. 11 - It is not usually necessary to validate the user's...Ch. 11 - In most cases, a menu-driven program should be...Ch. 11 - If a menu-driven program does not use a loop to...Ch. 11 - In a single-level menu, the user might see a...Ch. 11 - What type of structure do you use in a program to...Ch. 11 - What ways for validating a users menu selection...Ch. 11 - How can you design a menu-driven program so that...Ch. 11 - When a program has a lot of items for the user to...Ch. 11 - Prob. 1AWCh. 11 - Design a case structure that can be used with the...Ch. 11 - Put the algorithms that you designed for questions...Ch. 11 - Look for ways to modularize the algorithm that you...Ch. 11 - Language Translator Design a program that displays...Ch. 11 - Prob. 2PECh. 11 - Prob. 3PECh. 11 - Astronomy Helper Create an application that...Ch. 11 - Golf Score Modification In Programming Exercise 6...Ch. 11 - Phone Book Program Design a program that you can...Ch. 11 - Prob. 7PE
Knowledge Booster
Similar questions
- # Constants for the menu choices# Constants for the menu choicesPURCHASE_ADULT = 1PURCHASE_CHILD = 2PURCHASE_MOUSE_EARS = 3PURCHASE_PARKING = 4PURCHASE_FOOD = 5PRINT_ALL = 6CALC_TOTAL = 7QUIT_CHOICE = 8# The main function.def main():# The choice variable controls the loop# and holds the user's menu choice. choice = 0 costAdult=0 costKid=0 costEars=0 costPark=0 costFood = 0 while choice != QUIT_CHOICE:# display the menu. display_menu()# Get the user's choice. choice = int(input('Enter your choice: '))# Perform the selected action. if choice == PURCHASE_ADULT: costAdult = purchaseAdult() elif choice == PURCHASE_CHILD: costKid = purchaseKid() elif choice == PURCHASE_MOUSE_EARS: costEars = purchaseEars() elif choice == PURCHASE_PARKING: costPark = purchaseParking(); elif choice == PURCHASE_FOOD: costFood…arrow_forwardFor each of the following exercises, you may choose to write a console-based or GUI application, or both. Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the number of days for a resort stay. Then display the price per night and the total price. Nightly rates are $200 for one or two nights; $180 for three or four nights; $160 for five, six, or seven nights; and $145 for eight nights or more.arrow_forwardTuition Increase At one college the tuition for a full-time student is $6000 per semester. It has been announced that the tuition will increase by 2 percent each year for the next five years. Create an application with a loop that displays the projected semester tuition amount for the next 5 years in a ListBox control.arrow_forward
- Calculations: • Main Menu - None • Trim Molding - (length ++) / 8; add the length based on the number of walls needed then divide by 8 feet Carpet - (length * width) / 4; multiply the length and width of the room (in feet) then divide by 4 sq feet (covered by each carpet tile) ● ● Ceiling Tile o roomLength / tileLeanght tileL; o If the length of the room is not divisible by the length of the tile, you will need an additional tile to complete the job. if( roomLength % tileLeanght !=0) then tileL++; o room Width /tileWidth = tileW; o If the width of the room is not divisible by the width of the tile, you will need an additional tile to complete the job. if(room Width % tileWidth !=0) then tileW++; o totalTiles = tileW * tileL; Deliverables: = A flowchart for the main menu and each of the task- specific calculators will be created and delivered in PDF format (4 PDF files). A.java file will be created for the main menu and each of the task-specific calculators (4 .java files).arrow_forwardA custom tailor offers a variety of custom suit options to customers. The company has tasked you with creating a program that will allow tailors to enter information about the kind of material used to make the customer's custom suit and the number of square yards used to make the suit and will determine the total cost to charge the customer. Use the following steps to create the program: The program should display a menu that asks the technician to select the type of material that was used. Make sure the menu is formatted exactly as in the Sample Input and Output of the instructions (including indentation). The program should determine the cost per square yard of the material. The cost per square yard is determined based on the type of material that is used. Table 1: Type of Material and Cost per Square Yard The program should then ask the tailor to enter the number of square yards of material that they used to make the custom suit. Calculate the material cost, which…arrow_forwardNumber of ways you can arrange the top 5 items out of 10 items on a menu.arrow_forward
- Visual Basic Windows Form You now need to create the menustrip called COMPUTE and under it one named INCHES-MM and MPG. Also create the last menu called UTILITIES and under it CLEAR and QUIT. On the form put two radio buttons. The labels read Convert Inches to mm and Covert MM to inches. Your code for the INCHES_MM pull down menu must look at the radio buttons and determine which is selected and convert the correct units. Also use a message box to display the message “You must select one radio button to proceed” if the user forgets to select either button. This code has two decision making code sequences. Be sure to put the strings “inches” and “mm” after the displayed answer.arrow_forwardThis control has a rectangular area that functions like a text box. 1. List box 2. Drop-down list box 3. Combo box 4. Input labelarrow_forwardA menu is generated using the following code: Status=menu('ClassStanding','Freshman','Sophomore','Junior','Senior'); Write a segment of code using switch-case that will classify the person making a menu selection as a new student (freshman) or a continuing student (sophomore, junior, or senior). The code should display one of the following messages: You are a new student. You are a continuing student. You did not make a selection.arrow_forward
- Android Studio with Javaarrow_forward..arrow_forwardSelect the correct answer from each drop- down menu. Control structures are used while performing everyday tasks. If you had to make a choice between studies and games during a holiday, you would use the sequence X control structure. If you had to fill your name and address on ten assignment books, you would use the selection X control structure.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,