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 Message property when a Book does not meet the price-to-pages ratio. For example, an error message mightg be: For Goodnight Moon, ratio is invalid. ...Price is $12.99 for 25 pages.
Create a Book class that contains fields for title, author, price, and number of pages. Include properties for each field. 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 for Book objects - some where the ratio is acceptable and others where it is not. Catch any thrown exceptions and display the BookExceptionMessage. Save the file as BookExceptionDemo.cs
================
*Instant Download
The Peterman Publishing Company has decided that no published book should cost more than 10 cents per page
- Technology: C-Sharp-Programming
- Code: SHC_VCS_10001
-
$9.99
Tags: Peterman, Publishing, Company, BookExceptionMessage, BookExceptionDemo.cs, Visual, C, Sharp, BookException, C#