Create an entertainment act class

Assignment Help Computer Engineering
Reference no: EM131468115

Complete the following tasks:

a. Create an Out Of Range Exception that descends from the built-in out_of_range exception class. Include fields that hold the low and high limits of the range and the value that was out of range. Include get functions for each of the values.

b. Create a Meal class. Data fields include a string entrée name and a double price. Include a data entry function that prompts for and accepts values for both data fields, and that throws an Out Of Range Exception if the price is less than $5.00 or more than $29.99. Include a public function that returns the Meal price so that you can use it in a calculation in the Party class that you will create in part d of this problem. Also include an overloaded insertion operator to display a Meal's data values.

c. Create an Entertainment Act class. Data fields include a string phone number for the contact person for the act and a double fee for the entertainment act. Include a data entry function that prompts for and accepts values for both data fields, and that creates and throws an Out Of Range Exception if the price is less than $50.00 or more than $3,000. Include a public function that returns the Entertainment Act price so that you can use it in a calculation in the Party class that you will create in part d of this problem. Also include an overloaded insertion operator to display an Entertainment Act object's data values.

d. Create a Party class for a party-planning organization. A Party contains a Meal, an Entertainment Act, an integer number of guests invited to the party, and a total cost for the party. The Party data entry function prompts the user for Meal, Entertainment Act, and guest number values. The function throws an Out Of Range Exception if the number of guests is less than 2 or more than 1000. The function also calculates the Party cost, based on the Meal's price times the number of guests, plus the price of the Entertainment Act.

e. Write a main() function that instantiates at least five Party objects and accepts data for each. When you run the program, provide data that tests that each type of exception is being recognized. The main() function should catch the exceptions and display an appropriate error message about each including what the acceptable range was and what the entered value was. If an exception is caught, the data for the entire Party object should be entered again. Save the file as Party.cpp.

Reference no: EM131468115

Questions Cloud

Avis company is car rental company : Avis Company is a car rental company that is located three miles from the Los Angeles airport (LAX).
Responsible for implementing the plan : Describe the authority structure of the plan's implementation. This must describe who is responsible for implementing the plan.
Agile project teams are typically co-located : Agile project teams are typically co-located. Why is this so important to an agile project and what does it facilitate on an agile project?
Read jackson learss article - same old new atheism : Read Jackson Lears's article, "Same Old New Atheism: On Sam Harris."summarizing the article and drawing out connections.
Create an entertainment act class : Create an Entertainment Act class. Data fields include a string phone number for the contact person for the act and a double fee for the entertainment act
Versus managers on a project : Compare and contrast leaders versus managers on a project.
Individuals are motivated to satisfy a number of needs : Hierarchy of needs put a lot into perspective for me, and I truly believe could be a life long lesson.
Ledbetter fair pay act : The Lilly Ledbetter Fair Pay Act of 2009 (FPA) prohibits employment discrimination against persons over 40 years of age.
Acc-american heart association : Compare Valanis's criteria for a good screening program with the eight criteria which the ACC/American Heart Association (AHA) panel proposed for selection.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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