Write a main program that first reads all available meals

Assignment Help Programming Languages
Reference no: EM13772057

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 yourresponsibility.

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: EM13772057

Questions Cloud

Practice of public health or community health nursing : Identify a new law or regulation that affects the practice of public health or community health nursing. Discover the sponsor of the action. Using news reports, statements in the public record, personal telephone or other interview data, outline t..
Characteristics of various types of provider organizations : Explain the salient characteristics of various types of provider organizations, including mission, program goals and objectives, staffing requirements, and policies and procedures.
Evaluate the potential effectiveness of model positioning : Evaluate the potential effectiveness of the model positioning of motivation, and propose at least one action that the organization can take in order to apply the concept.
What is the :: called in c++ : What is the :: called in C++ when used like this std::endl; In my main file, what line of code prevents me from having to put std before every endl
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.
What is the equilibrium quantity of bicycles : Suppose we have the following market supply and demand schedules for bicycles: Price Quantity Demanded Quantity Supplied $100 70 30 $200 60 40 $300 50 50 $400 40 60 $500 30 70 $600 20 80. Plot the supply curve and the demand curve for bicycles. What ..
Pieces of nutrition education serve : How will you ensure they will be motivating? How did you use art and design principles to enhance the quality of each?
Fire engineering-safety professional-safety & health : You are welcome to select from any of these: Firehouse, Fire Engineering, Safety Professional, Safety & Health, ESH Today, ISHN Global, International Fire Protection, and others. You are required to follow all rules and regulations relative to res..
Define the sociological perspective or imagination : Define the sociological perspective or imagination, cite its components, and explain how they were defended by C. Wright Mills.

Reviews

Write a Review

Programming Languages Questions & Answers

  Design the class table and uml diagram

Question 1: Design the class table and UML diagram. Question 2: Write an algorithm for each operation. Question 3: Write a test or driver algorithm to test the solution.

  Give value of mytop and contents of the array

Assume that stack is the class described in this section with stacktype set to int and stack_capacity or mycapacity set to 5. Give the value of mytop and the contents of the array.

  Design and algorithm that compute numbers of married men

Design and algorithm that will read through the file and compute the numbers of married men, single men, married women and single women.

  Write the program by using ias instruction set

Using IAS instruction set, write the program for this problem. Ignore fact that IAS was designed to have only 1000 words of storage.

  Program to display total sales salesmen

Display total sales per (6) salesmen. Place first and last names for (6) salesmen in array. When you display your final output, print salesman's last name only.

  Write a javascript function to validate a text-field

Write a JavaScript function to validate a text-field on a form that is to hold an email address. Now when writing this JavaScript function bear in mind that you won't be able to fully validate it unless you manage to interrogate the server in whic..

  What are the contents of given register

Memory location 2000H has the word 5000H stored in it. What does each location contain after INC BYTE PTR[2000H]. Also after DEC WORD PTR[2000H]

  Program to display information about balance in account

Design an ordinary text file named solution06.txt. In that file, enter text required to make a web page that will display information about balance contained in family's account.

  Game of life

The game is played on the rectangular board. Each square at time T could contain 1 that indicates the presence of the organism (life) or 0 that indicates the absence of the organism (death).

  Performance comparison- rsa versus aes

Exercise the idea that digital certificates are verified using a chain of trust. The trust anchor for the digital certificates is the Root Certificate Authority (CA)

  Create function m-file called mass that requires two vector

Create a function M-file called mass that requires two vector inputs-the number of moles and the molecular weight-and returns the corresponding mass. Because you are providing vector input, it will be necessary to use the meshgrid functio..

  Write paper describing xml and json

Write two page paper describing XML and JSON. What are they? Why do we need them? Are there certain applications that favor one of the these over the other? Explain. What is SOAP?

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