Question: Question 1 marks ] You are tasked with creating a simple menu - driven program for a fast - food restaurant. The program should allow

Question 1
marks]
You are tasked with creating a simple menu-driven program for a fast-food restaurant. The program should allow the user to order food items by selecting options from a menu using a switch statement. The user can continue ordering items until they decide to exit the program.
Requirements:
Display a menu with the following options:
Burger - R5.99
Pizza - R7.99
Fries - R2.49
Soda - R1.49
Exit
Required:
a. Implement a recursive function that repeatedly displays the menu, takes the user's order, and calculates the total cost until they choose to exit.
b. Use a switch statement within the recursive function to process the user's choice:
For options 1-4, display a message indicating the item ordered and its price.
For option 5(Exit), display a thank you message and exit the recursion.
Calculate and display the total cost of the user's order.
Your recursive function should guide the user through the ordering process and provide the total cost when they choose to exit.
Question 1 marks ] You are tasked with creating a

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!