Question: Homework Assignment - 1 Topics: print, while loop, basic I / O , conditional structure Problem Statement: Welcome to Salad Bar In this assignment, you
Homework Assignment Topics: print, while loop, basic I O conditional structure Problem Statement: Welcome to Salad Bar In this assignment, you will design a simple salad bar interface. The program will display a main menu to the user to begin. User will choose from given options to order types of salad, calculate and display total cost and tax. The program will repeat taking user input until user hits exit option. Design your solution: Main menu: Create a main user menu to display the main options to the user. User have the option to choose between and The program will display an error message if user option is not within the valid selection less than and greater than Think about using a conditional structure to serve the user choice. Invalid option for e g can be handled with default else block please see sample I O for error message A main menu is as follows and detailed of each option is provided below: a Order Salad: User can order three different types of salad base: veggie, seafood and protein based. Like main menu any invalid option will display an error message. A sample menu is as follows along with price: b Checkout: Option Checkout in main menu will calculate the total cost along with the sales tax. To calculate the tax, you can multiply sales tax with total cost. For this program, you can assume VA sales tax
Heres a basic design for the Salad Bar interface you need for your homework assignment:
Steps:
Main Menu:
o Display the main options to the user:
Option : Order Salad
Option : Checkout
Option : Quit
o Handle invalid inputs by showing an error message if the user selects an option not between and
Order Salad:
The user selects one of the following salad types:
o Veggie Salad $
o Seafood Salad $
o Protein Salad $
Handle invalid inputs in a similar way as the main menu.
Checkout:
Calculate the total cost.
Apply the VA sales tax
Display the total amount including the tax.
Quit:
Exit the program with a goodbye message.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
