Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need to be able to compile to program. 1. Problem Statement: The goal of this programming assignment is to give students experience creating an
I need to be able to compile to program.
1. Problem Statement: The goal of this programming assignment is to give students experience creating an interactive program that uses nested conditional statements to implement a series of menus. In particular, your task is to write a program that simulates a web service where users can order food items at three popular restaurants. To meet these goals, your program should do the following: Print a message asking the user which restaurant they wish to order from (e.g. McDonald's, Wendy's or Chick-fil-A). You should also include instructions on what to enter to select a restaurant. For example, one option is to use integers 1,2,3. Another option is to use single characters M,W,C. It is up to you to choose what the user should type. Read the user's input from above, and use this information to decide what list of food menu items to print. To keep things short and simple, your three menus should only include five items each. For each menu item, you should print the name of the item and the price of the item (e.g. Big Mac Meal $5.99). You should also print instructions on what the user must type to select an item. For example integers 1,2,3,4,5 or single characters A,B,C,D,E. Again, this is up to you . Read the user's input of the menu item they wish to buy, and ask them how many orders of that item they want to buy. Read the integer item quantity from the user, and calculate and print the total cost for this purchase using the formula "total cost- item price*tem quantity sales tax". To keep things simple, lets pretend the sales tax rate is 5% of the purchase price Your program should do some basic error checking. If the user does not choose a restaurant correctly, your program should print the message "Sorry, that restaurant is not available" and exit. If the user types in an invalid food item, your program should print the message "Sorry, that is an food item is not available" and exit. Finally, if the user enters a negative quantity, the program should print the message "Sorry, item quantity must be positive" and exit. You do NOT need to loop asking the user to enter their choice again. . is project is about conditional statements (and not loops) you are NOT red to handle multiple orders at one time. The user will just have to run your program a second time to order something else. 2. Design: This nrgiect is all ahout nrinting messages reading user innuts and nerformingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started