Thursday
May 23, 2013

Homework Help: C#

Posted by Isaih on Wednesday, August 29, 2012 at 7:35pm.

The Peterman Publishing Company has decided that no published book should cost more than 10 cents per page. Create a BookException class whose constructor requires three arguments: a string Book title, a double price and an int number of pages. Create an error message that is passed to the Exception class constructor for the [I]message[I] property when a Book does not meet the price-to-pages ratio. For example an error message might be:

For Goodnight Moon,raio is incalid
...Price is $12.99 for 25 pages

Create a Book class that contains fields for title, author, price , and number of pager. Include properties for each fields. Throw a BookException if a client program tries to construct a Book object for which the price is more than 10 cents per page. Create a program that creates at least four Book objects- some were the ration is acceptable and the others where it is not. Catch any thrown exceptions and display the BookException Message.

No one has answered this question yet.

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Word Problem Cost minimization - Don Garcia needs at least 24 units of vitamin A...
Microeconomics - I am on the chapter for monoplies. I need to calculate the ...
Strayer University - a dog-food company makes a special kind of dog food. It ...
Algebra - ABC phone company charges $18 per month plus 7 cents per minute of ...
Math - A small publishing company is planning to publish a new book. The ...
Alg I - One type of decorative ribbon regularly costs $3.59 per yard. When the ...
calculus - A company wants to bid on an order of 20,000 square based boxes which...
Physics - At 7.65 cents per kilowatt-hour, what does it cost to operate a 10.0 ...
Microeconomics - I put this question on the board before. What I am not clear on...
Stats - Consider the Avionic Manufacturing Company that wishes to meet a demand ...

For Further Reading

Search
Members
Community