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

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 Databases Questions!