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

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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