Modify the driver program from Practice Program 3 in Chapter 8 to use three exception classes called

Question:

Modify the driver program from Practice Program 3 in Chapter 8 to use three exception classes called CylinderException, LoadException, and TowingException. The number of cylinders must be an integer from 1 to 12, the load capacity must be a number from 1 to 10 (possibly with a fractional part), and the towing capacity must be a number from 1 to 20 (possibly with a fractional part). Anything other than numbers in these ranges should cause your program to throw and catch the appropriate exception. You also need to define the classes CylinderException, LoadException, and TowingException.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: