Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92276854

Have any Question?


Related Questions in Computer Engineering

When selecting a new computer identify the key components

When selecting a new computer, identify the key components that drive the performance of the machine. And, if you were to spend additional funds on increasing the computer's performance, which component would provide the ...

Question individual project - submit to the unit 3 ip

Question: Individual Project - Submit to the Unit 3 IP Area This part of the assignment is FOR GRADING for this week. This assignment is a document addressing security and should be submitted to the week's individual dro ...

Question questions 1 - 3 are related to singly linked list

Question: Questions 1 - 3 are related to "singly linked list". You must type your answer. 1. What are the fundamental operations of a linked list? 2. What is the main advantage of a linked list over an array? 3. What is ...

Assignment write an 8-page apa formatted paper on a

Assignment: Write an 8-page APA formatted paper on a business problem that requires data mining, why the problem is interesting, the general approach you plan to take, what kind of data you plan to use, and finally how y ...

A financial analyst examined the possible returns from

A financial analyst examined the possible returns from several financial investments. When the performance of these investments was later examined, it turned out that 25% performed much better than the market average, 25 ...

Shell scripting -- linuxpart-1 write a script that asks the

Shell Scripting -- Linux Part-1 Write a script that asks the user to enter his name. Read the name. Then asks the user to enter the phone number. Then read the phone number. Append the name and phone number (separated by ...

Question suppose a task consists of 40 cpu access 20 memory

Question : Suppose a task consists of 40% CPU access, 20% memory access and 40% disk access. A CPU with 8 cores provides an effective speedup of only 4 over a singlecore CPU. What is system speed up (as defined by Amdahl ...

Wat are three 3 major categories of cyber terrorism and

What are three (3) major categories of cyber terrorism and / or information warfare. Among the chosen categories, determine the one (1) that should be the top priority for the federal government to address.

Research 3 risk estimation methodswrite a short explanation

Research 3 risk estimation methods. Write a short explanation of each method to someone with little knowledge of information security or risk. Compare the advantages and disadvantages the three methods above?

Part 1whats the importance of a documentation plan please

Part 1: What's the importance of a Documentation Plan? Please provide an example of a Documentation Plan that you would use. Part 2: How do you calculate how long a project will take? These questions are for my Introduct ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As