Question
Create a C# function that reads and displays a text file menu. ********************************** * Welcome to Alonzos Coffee Shop! * * What would you like
Create a C# function that reads and displays a text file menu.
**********************************
* Welcome to Alonzos Coffee Shop! *
* What would you like to order? *
* 1. Coffe ($1.50) *
* 2. Latte ($2.00) *
* 3. Pastry ($1) *
* 4. Exit *
**********************************
Then create a function to gather the response of the user and validates it with if statements. Validate the user input with the if statement depending of the if statement we display a menu and gather the user input . Use switch statements inside of the if statements to gather response we validate the user response with a switch statement. If the user selects 1 Coffee we display a addon menu
* You selected Coffee *
* What would you like to add any items? *
* 1. Sugar *
* 2. Milk *
* 3. Creamer *
* 4. Return to the main menu *
If user selects 2
* You selected Latte *
* What would you like to add any items? *
* 1. Honey *
* 2. Caramel *
* 3. Return to the main menu *
If user selects 3
* You selected Pastry *
* What would you like to add any items? *
* 1. Donut *
* 2. Cake *
* 3. Pie *
* 4. Return to the main menu *
Repeat the code till the user chooses to exit on the main menu. Create a function to calculate the cost of the purchases and then display the receipt.
Step 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