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 -1 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: 1. Main menu: Create a main user menu to display the main options to the user. User have the option to choose between 1 and 3. The program will display an error message if user option is not within the valid selection ( less than 1 and greater than 3). Think about using a conditional structure to serve the user choice. Invalid option ( for e . g .4) 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 2 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 4.3%.
Heres a basic design for the Salad Bar interface you need for your homework assignment:
Steps:
1. Main Menu:
o Display the main options to the user:
Option 1: Order Salad
Option 2: Checkout
Option 3: Quit
o Handle invalid inputs by showing an error message if the user selects an option not between 1 and 3
Order Salad:
The user selects one of the following salad types:
o Veggie Salad ($5.00)
o Seafood Salad ($8.00)
o Protein Salad ($7.00)
Handle invalid inputs in a similar way as the main menu.
Checkout:
Calculate the total cost.
Apply the VA sales tax (4.3%).
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 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!