Question: Task 1: Write a program to help a local restaurant automate its breakfast billing system. The program should do the following: i. Show the customer

Task 1: Write a program to help a local restaurant automate its breakfast billing system. The program should do the following:

i. Show the customer the different breakfast items offered by the restaurant. ii. Allow the customer to select more than one item from the menu. iii. Calculate and print the bill.

Assume that the restaurant offers the following breakfast items (the price of each item is shown to the right of the item):

Plain Egg E1.45 Bacon and Egg E2.45 Muffin E0.99 French Toast E1.99 Fruit Basket E2.49 Cereal E0.69 Coffee E0.50 Tea E0.75

Use an array, menuList, of the struct menuItemType, enuItemType is a struct with two components: menuItem of type string and menuPrice of type double.

Your program must contain at least the following functions: Function getData: This function loads the data into the array menuList. Function showMenu: This function shows the different items offered by the restaurant and tells the user how to select the items. Function printCheck: This function calculates and prints the check.

(Note that the billing amount should include a 5% tax.) A sample output is:

Welcome to Dlamini's Restaurant Bacon and Egg E2.45 Muffin E0.99 Coffee E0.50 Tax E0.20 Amount Due E4.14

Format your output with two decimal places. The name of each item in the output must be left justified. You may assume that the user selects only one item of a particular type.

Task 2: Redo Task 1 so that the customer can select multiple items of a particular type. A sample output in this case is:

Welcome to Dlaminis Restaurant 1 Bacon and Egg E2.45 2 Muffin E1.98 1 Coffee E0.50 Tax E0.25 Amount Due E5.18

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To build a program that automates the breakfast billing system of a restaurant we will need to follow these steps implementing each function according ... View full answer

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!