Wednesday
October 1, 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

C++ Programming - create a class called DataSet. This class will have a default ...
computer science - I need to see if someone can hepl me with a c# programming ...
Computer Science - I need help with these assignments. "Write a program to read ...
Java Help - I am just starting out in programming. If someone could help me with...
programming - a) Define a Cat class. A Cat has name. Define two constructors, ...
Computer Science - Write a Class to represent one of the following items. Note ...
Computer Sci Help pls - Write a Class to represent one of the following items. ...
Word Problem Cost minimization - Don Garcia needs at least 24 units of vitamin A...
C# Programming - There are three seating categories at an athletic stadium. For ...
Global science - Exponential growth is stopped when______equals. there are no ...

Search
Members