Question: Assignment 6: Restaurant Please complete the program described below. You will turn in to the dropbox: The code, as a plaintext file (use cat

Assignment 6: Restaurant Please complete the program described below. You will turn in to the dropbox: TheWelcome to the restaurant ! 1) Display menu. 2) Order an item. 3) Edit a menu item (Employees only!) -1) ExitWelcome to the restaurant! 1) Display menu. 2) Order an item. 3) Edit a menu item (Employees only!) -1) ExitWelcome to the restaurant! 1) Display menu. 2) Order an item. 3) Edit a menu item (Employees only!) -1) Exit

Assignment 6: Restaurant Please complete the program described below. You will turn in to the dropbox: The code, as a plaintext file (use cat filename.c to print out the file. Highlight it to copy, then paste into a text editor) A screenshot of the code running with your name included The file must be named menu.c located in a folder called a6 in your home directory You are going to help craft a restaurant's menu system. Create a struct to represent a menu item. It will have the fields "name", "price", and "calories". In your main function, do the following. o Create an array of 5 menu items. Hard code starting values for these items. You can make them whatever you want. For instance, "Cheeseburger", 2.99, 650 o While the user does not input-1, display the following choices to the user. 1: Print menu 2: Order an item 3: Edit an item on the menu -1: Exit o Use the functions described below to help with this process. For #3, ask the user which item (1-5) they want to edit, and use your make menu item function to overwrite the value in your array. You MUST use function prototypes for this assignment. Create a function to print a single menu item. This function should take your struct as input and return nothing. It should look nice, although the specifics are up to you. o Cheeseburger o $2.99, 650 calories Create a function to make a menu item. It should take no input, and return your struct. You should scan all necessary values from the user. Create a function to order an item. It should take your array as input, and return nothing. Let the user enter a number 1-5 to order something, then thank the user for ordering. Print out the total for the order. o Thanks for ordering the Cheeseburger. Your total is $2.99. Welcome to the restaurant ! 1) Display menu. (2) Order an item. 3) Edit a menu item (Employees only!) -1) Exit Make a selection: 1 Item 1 Cheeseburger $2.99, 650 calories Item 2 Chicken Strips $1.99, 550 calories Item 3 Fries $1.09, 300 calories Item 4 Salad $2.99, 175 calories Item 5 Sandwich $1.50, 425 calories Welcome to the restaurant! 1) Display menu. 2) Order an item. 3) Edit a menu item (Employees only!) -1) Exit Welcome to the restaurant! 1) Display menu. 2) Order an item. 3) Edit a menu item (Employees only!) -1) Exit Make a selection: 2 Which item do you want to order? (1-5): 3 Thanks for ordering the Fries. Your total is $1.09 Welcome to the restaurant! 1) Display menu. 2) Order an item. 3) Edit a menu item (Employees only!) -1) Exit Make a selection: Welcome to the restaurant! 1) Display menu. 2) Order an item. 3) Edit a menu item (Employees only!) -1) Exit Make a selection: 3 Which item do you want to edit? (1-5) 4 Name of the new item: Milkshake Price of the item: 1.50 Calories in the item: 500 Welcome to the restaurant! 1) Display menu. 2) Order an item. 3) Edit a menu item (Employees only!) -1) Exit Make a selection: 1 Item 1 Cheeseburger $2.99, 650 calories Item 2 Chicken Strips $1.99, 550 calories Item 3 Fries $1.09, 300 calories Item 4 Milkshake $1.50, 500 calories Item 5 Sandwich $1.50, 425 calories Welcome to the restaurant! 1) Display menu. 2) Order an item. 3) Edit a menu item (Employees only!) -1) Exit Make a selection: -1

Step by Step Solution

3.42 Rating (142 Votes )

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!