Write a menu and ordering system for a restaurant

Assignment Help Computer Engineering
Reference no: EM131310194

Assignment

You will write a menu and ordering system for a restaurant using a class for the menu items. Put the class code and the main in a single file.

Write a class menuItem that contains the following:

A member variable to contain an integer that is an item number
A member variable to contain a string describing the item, for example "Cheese Omelette"
A member variable to contain the price of the item
A default constructor that sets the item number to 0, the description to "unknown" and the price to 0
A constructor that accepts the item number, description and price as arguments.
Accessor (get) functions for each of the member variables
Mutator (set) functions for each of the member variables
A function called printItem that prints out the information for a menu item in a nice format on a single line.

Write your main to:

Prompt the user to enter the number of items on the menu. Validation: The input should be greater than 0 and not more than 50

Dynamically allocate an array of menuItems based on the number of items input.

Dynamically allocate a parallel array of integers that will store the quantity of that item in a customer order.

Prompt the user to enter the description and price for each menu item. You can assign the item number using the order the items were entered (starting at 1, not 0). You'll need to use cin.get() and getline when mixing string and numeric input (see pages 120-125 in the textbook). Validation: Do not allow prices <= 0.

Display the menu. Make up a name for the restaurant that includes your last name.

Loop asking the user to enter a sales ticket number or 0 to exit. If 0 is entered, the program should output the grand total of sales for the run and end. Remember to delete the dynamic arrays before the return 0.

If a ticket number is entered, loop asking the user to enter the item numbers ordered on that ticket, entering 0 when finished. It is your choice if you want to ask for a quantity or just have the user enter the same item number multiple times. Each time the user selects an item, increment the count of that item chosen in the parallel integer array. When the user enters 0, display the list of the items they ordered with the count of each (with or without the menu item number or cost). Then display the total amount due for that order. Validation: A check number should not be less than 0.

I've attached a sample run. Please feel free to improve on my user interface. Also feel free to break your main up into functions. I created functions to print out the menu and to get each menu item input from the user.

When your code is working properly, copy and paste the code to the answer box. Also attach a screen capture showing the program running.

Reference no: EM131310194

Questions Cloud

What are some of the reasons for given requirement : Employers continue to emphasize good communication skills as one of the most important qualifications for screening career-school and business graduates. What are some of the reasons for given requirement.
Bonds make semiannual payments : Stone Sour Corp. issued 20-year bonds 2 years ago at a coupon rate of 7.1 percent. The bonds make semiannual payments. If these bonds currently sell for 105 percent of par value, what is the YTM?
Differences between the pp and the st that implements pp : Choose a Common Criteria protection profile and a security target of a product that implements that profile (see the Common Criteria Web site [211]). Identify the differences between the PP and the ST that implements the PP
Provide a brief description of the selected manuscript : Be sure to include the following information in your paper: Provide a brief description of the selected manuscript. Identify the selection criteria and methods, and discuss how they relate to the needs of the organization in the case
Write a menu and ordering system for a restaurant : You will write a menu and ordering system for a restaurant using a class for the menu items. Put the class code and the main in a single file. Write a class menuItem that contains A member variable to contain an integer that is an item number.
What is current bond price : Sqeekers Co. issued 11-year bonds a year ago at a coupon rate of 8.9 percent. The bonds make semiannual payments and have a par value of $1,000. If the YTM on these bonds is 7.2 percent, what is the current bond price?
Create an application that displays payroll information : To create an application that displays PAYROLL information. The application should allow the user to enter the following data for four employees Number of hours worked.
How each feature can be used to monitor employee benefits : Describe the major features of this Website and how each feature can be used to monitor employee benefits. Explain how employers could verify that their employee benefits comply with all federal laws by using this resource
President and congress increased government purchases : Suppose real GDP is currently $12.5 trillion and potential real GDP is $13 trillion. If the president and Congress increased government purchases by $150 billion, what would be the result on the economy if the MPC is .80?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Sectors on the physical device

For any volume(s) situated on the EnCE Hard Drive, answer the following questions by writing question number and answer within a Notes Bookmark. Keep the Notes Bookmark within the bookmark folder created for that volume. Specify how many sectors a..

  What is the best way to write down the value ''7564''

What is the best process to write the value '7564' and make it clear to the reader that the number should be interpreted as a hexadecimal value?

  You have been hired by a big company with branch offices

you have been hired by a large company with branch offices around the country to assist with rollout of a new

  The problemyou have been given the job of choosing an

the problemyou have been given the job of choosing an admission policy for an atm multiplexer which has been

  To begin to combine and demonstrate skills in drawing tools

to begin to combine and demonstrate skills in drawing tools tweens working with text and telling a storyassignment

  Illustrate the architecture of the oracle instance

The Oracle Instance and Transaction/Query Processing (a) Illustrate the architecture of the Oracle instance, including all memory structures, processes, and associated physical files.

  How can user context used to more effectively control data

How can user context be used to more effectively control data? Provide specific examples. Identify at least three companies that have software that manages user context.

  Develop and the function that returns the periodic payment

Develop and the function that returns the periodic payment. The amount loaned, rate of interest and the number of payments in a year must be input by the user.

  Call a unary language an arithmetic progression

Call a unary language an arithmetic progression if it is the set {\(x^{m+ni}\)} : i >= 0 for some m and n show that if a unary language is regular , then it is the union of a finite set and a finite number of arithmetic progressions

  Define the line through the maze and avoid obstacles

Program variables (any int, Boolean. or string used in the while program). Everything needed to follow the line through the maze and avoid obstacles

  Choose three or more types of testing

Write down the discussion as if you are the systems analyst briefing your CIO as the two of you are walking over to the steering committee meeting in which a "go/no go" decision will be made whether to go live with your new enterprise system (this..

  Discuss the advantages of the approach

Briefly explain the main problem addressed and why you have found it interesting - Classify to which topic from the aforementioned areas this paper belongs.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd