Lab 1 BSSEF18 Afternoon Total Points: (35) : Part A: (5 PTS)
Lab 1 BSSEF18 Afternoon Total Points: (35) : Part A: (5 PTS)
Lab 1
BSSEF18 Afternoon
Total Points: (35)
Part A: [5 pts]
Define a struct, menuItemType, with two components: menuItem of type string and menuPrice of type
double.
Write a program to help a local restaurant automate its breakfast billing system. The program should do
the following:
a. Show the customer the different breakfast items offered by the restaurant.
b. Allow the customer to select more than one item from the menu.
c. Calculate and print the bill.
Use an array, menuList, of the struct menuItemType, as defined in Task A. 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.) If tax amount turns out to be in decimal then round it off to ceiling
value. E.g. if tax is 12.3 then it will be added as 13 in the total bill.
Format your output such that 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.
Part C: [10 pts]
Redo part B so that the customer can select multiple items of a particular type. A sample output in this
case is: