Starting Out with Programming Logic and Design (4th Edition)
Starting Out with Programming Logic and Design (4th Edition)
4th Edition
ISBN: 9780133985078
Author: Tony Gaddis
Publisher: PEARSON
Expert Solution & Answer
Book Icon
Chapter 11, Problem 2MC
Program Description Answer

A “decision structure” is used to perform an action, which is selected by the user from a menu.

Hence, the correct answer is option “D”.

Blurred answer
Students have asked these similar questions
A pizza menu allows you to select 4 toppings at no extra charge from a list of 9 possible toppings. The number of ways can you select 4 toppings pizza will be Select one: O 84 O 126 O 36 O 256
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…
Geometry Calculator Write a program that displays the following menu: Geometry Calculator 1. Calculate the Area of a Circle 2. Calculate the Area of a Rectangle 3. Calculate the Area of a Triangle 4. Quit Enter your choice (1-4): If the user enters 1, the program should ask for the radius of the circle and then display its area. Use the following formula: area = Pi*r^2 Use 3.14159 for and the radius of the circle for r. If the user enters 2, the program should ask for the length and width of the rectangle and then display the rectangle’s area. Use the following formula: area = length * width If the user enters 3 the program should ask for the length of the triangle’s base and its height, and then display its area. Use the following formula: area = base * height * .5 If the user enters 4, the program should end. Input Validation: Display an error message if the user enters a number outside the range of 1 through 4 when selecting an item from the menu. Do not accept negative values for…

Chapter 11 Solutions

Starting Out with Programming Logic and Design (4th Edition)

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,