Tuesday
March 31, 2015

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

programming - Design a class named Book that holds a stock number, author, title...
book report - what do i have to write on a cover page of book report?how is it ...
Math - A small publishing company is planning to publish a new book. The ...
english - hi! nedd some help.i am writing a book report and have question.how ...
managerial economics - BigBook is a monopolist book publishing company, which ...
English - Can someone please tell me the format of a COVER page in MLA. I'm ...
Microeconomics - I am on the chapter for monoplies. I need to calculate the ...
English; Help.. - Imagine that you are an agent who is interested in publishing ...
Writing Skills Part 3 - 1.Under the Library of Congress system,where would you ...
Math/Algebra - At Gwen's garage sale, all books were one price, and all ...

Members