In C++ Define enumeration data type menuItemName with enumerators of PlainEgg, BaconAndEgg, Muffin, FrenchToast, FruitBasket, Cereal, Coffee, and...

60.1K

Verified Solution

Question

Programming

In C++

Define enumeration data type menuItemName with enumerators ofPlainEgg, BaconAndEgg, Muffin, FrenchToast, FruitBasket, Cereal,Coffee, and Tea.

Use an array, menuList, of the struct menuItemType, with treecomponents: menuItem of type menuItemName, menuPrice of typedouble, and Count of type int.

Write a program to help a local restaurant automate itsbreakfast billing system. The program should do the following:

a. Show the customer the different breakfast items offered bythe restaurant.

b. Allow the customer to select more than one item from themenu.

c. 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​$1.45

Bacon and Egg​$2.45

Muffin​$0.99

French Toast​$1.99

Fruit Basket​$2.49

Cereal​$0.69

Coffee​$0.50

Tea​$0.75

Use an array, menuList, of the struct menuItemType, with threecomponents: menuItem of enummenuItemName as described above,menuPrice of type double, and Count of type int. Your program mustcontain at least the following functions:

● Function showMenu: This function shows the different itemsoffered by the restaurant and tells the user how to select theitems.

● Function printCheck: This function calculates and prints thecheck. (Note that the billing amount should include a 5% tax.)

A sample output is:

Welcome to Johnny’s Restaurant

Bacon and Egg​1​$2.45

Muffin​1​$0.99

Coffee​2​$1.00

Amount Total​​$4.44

Tax​​$0.22

Amount Due​​$4.66

Answer & Explanation Solved by verified expert
4.3 Ratings (929 Votes)
Code in C include using namespace std enum declaration enum menuItemName PlainEgg BaconAndEgg Muffin FrenchToast FruitBasket    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students