Write a main program that first reads all available meals

Assignment Help Programming Languages
Reference no: EM131316511

Assignment

A catering company provides prepared meals for events such as business meetings. The company has a number of standard meals, which it identifies with a unique integer ID number. At this stage each meal also has just a cost in £ and each event is characterised by a list of the meals the company must prepare for it. However, more characteristics may be added to either object in the future.

The company desires that you develop a basic software package that it will be able to use in order to manage its business efficiently and which it intends will be expanded in the future.

Part 1

Your first task is to develop the basic meal and event classes. Please provide just the minimum functionality expected of any well designed class. Please make any required design decisions in the context of the project described above and in accordance with good software engineering practice.

Part 2

Provide stream operators for both the meal and event classes. Examination

Part 3

Add to the event class two member functions that return its most expensive meal and the total cost of all the meals.

Part 4

Write a main program that first reads all available meals from a file called menu.txt. Write a function called create_event. This function is be called if a customer of the company wants to book an event.

The function is to show the customer the details of all the available meals and then ask the customer to enter which meals they wish to select. Once complete, the function is to return a dynamically created event object.

Note well, the customer must be allowed to choose to abort the process within the function in which case consider carefully the return value of the function.

Finally the main program is to print to screen the total cost of the event.

Note well, the formatting and creation of an example of the file menu.txt is your responsibility.

Part 5

To provide for future expansion, it is now considered appropriate to generalise to the concept of a event.

All events, of whatever sub-category, are to contain the member variables and functions described above.

A particular sub-category of event is to be weekend_event. The price of all meals for a weekend_event is to be x% higher than the usual prices given above in the menu.txt file of task 4 for example. Each weekend_event can have a different value of x.

Please modify your basic class declaration and definition code (not the full code of task 4) to reflect the relationship between event and weekend_event.

In particular, ensure that the functionality of task 3 gives the correct costs when called through an event pointer.

Reference no: EM131316511

Questions Cloud

Calculate the binomial interest rate tree : Assume annual compounding of interest for these problems. Assume 10% annual interest rate volatility. Calculate the binomial interest rate tree using the 2-year on-the-run issue and the 3-year on-the-run issue.
Define pm assessment in context of the pmo : For this assignment, address the following items: Define PM assessment in context of the PMO infrastructure management. Describe the primary domains of encompassing PMO assessment
Write program that calculate and prints the monthly paycheck : Write a program that calculates and prints the monthly paycheck for an employee. The net pay is calculated after taking the following deductions: Federal Income Tax: 15%.
Nonconstant growth valuation-stock current price : Nonconstant Growth Valuation A company currently pays a dividend of $1.5 per share (D0 = $1.5). It is estimated that the company's dividend will grow at a rate of 24% per year for the next 2 years, then at a constant rate of 5% thereafter. The compan..
Write a main program that first reads all available meals : Write a main program that first reads all available meals from a file called menu.txt. Write a function called create_event. This function is be called if a customer of the company wants to book an event.
Find inertial force acting on the man at the position shown : A man walks along a guide at a constant velocity υ on a disk in the vertical direction in Fig. P5.2 while the disk rotates at a constant angular velocity ω. Find the inertial force acting on the man at the position shown.
Current and projected free cash flows-horizon value : Current and projected free cash flows for Radell Global Operations are shown below. Actual 2013 2014 Projected 2015 2016 Free cash flow $619.52 $680.20 $720.25 $763.47 (millions of dollars) Growth is expected to be constant after 2015, and the weight..
Write a burger tycoon project paper : Each student is to write a Burger Tycoon Project paper (1-2 typed pages, single spaced, professionally prepared) which is due at the last class session
Integrative problem exchange rate behavior : As an employee of the foreign exchange department for a large company, Determine whether triangular arbitrage is feasible, and if so, how it should be conducted to make a profit. Using the information in question 1, determine whether covered interest..

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program that inputs integers from keyboard

Write a program that inputs 20 integers from the keyboard and stores them in an array called A. You are then To: Output the numbers in the original input order.

  Write program to accept data in array with three structures

Develop and make a program which will accept above data in array with three structures. Once data have been entered, display report listing each employee number and salary of employee.

  What array positions are part of the free space list

What elements are in the list pointed to by list1?What elements are in the list pointed to by list2?

  Explain different kind of product sold

Use two-dimensional array to solve following problem. Company has four salespeople(1 to 4) who sell five different products (1 to 5). Once day, each salesperson passes slip for each different kind of product sold.

  Compute service charge customer owes for writing bad check

Create the output and sketch the flowchart or write pseudocode for program which computes service charge a customer owes for writing bad check.

  Compare all trees to all other trees.

Each line of values in input file "tree2Data.txt" represents one linear binary tree, where ' _ ' represents a no value node.

  Design application in visual basic.net 2005

Attached is a application created in Visual Basic.Net 2005

  Methods to declare and initialize one dimensional arraay

What is an array? Show different methods to declare and initialize one dimensional array. Draw how an integer array of 6 elements having base address 5001 is stored in memory.

  Program to track which user is logged onto which computer

Write a computer program that could be used to track, by lab, which user is logged onto which computer.

  Applyfunction that receives an array and a function

Write a function called applyFunction that receives an array (arr) and a function (func) as a parameter.

  Create a windows form application project.

After these two selections are made the user will click the Selection Complete button that will compute the total price of rental

  Javascript function for cookie added to user-s computer

JavaScript function has verified that all the required fields have been filled, cookie is added to user's computer. If same user attempts to fill out form second time.

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