Friday
April 18, 2014

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.

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

SCIENCE HELP PLEASE - 3. Which of the following methods of reporting research is...
SCIENCE HELP PLEASE - 3. Which of the following methods of reporting research is...
MATHS - A publishing company invited representatives from a certain number of ...
Global science - Exponential growth is stopped when______equals. there are no ...
research tech - which of the following is a primary source a. a newspaper ...
English - Publishing - If I self-publish my books (stories I wrote) then later ...
manageria economics - the largo publishing house use 400 printers and 200 ...
manageria economics - the largo publishing house use 400 printers and 200 ...
Math - Amayor has a friend in publishing who tells him they have just published ...
English - Please check. 1. A book published by Harcourt Press, Inc. It was ...

Search
Members