Define an exception class called DimensionException to use in the driver program from Programming Project 4 in Chapter 8. Modify that driver program to throw and catch a DimensionException if the user enters something less than or equal to zero for a dimension.
This project is fairly simple. The DimensionException class is written to accept a String and an integer so the message can be more helpful (it can display which dimension is invalid and its value). The MoreGraphicsDemo program from Chapter 8 Programming Project 4 is modified to create the version using DimensionException and to be interactive so the exception code can be exercised.
See the code in DimensionException.java, DimensionExceptionDemo.java, SquarePr7.java, Rectangle.java, and RightTriangle.java. Uses ShapeBase.java.
You might also like to view...
To avoid problems, preventive maintenance _____.?
A. ?adds enhancements to an operational system and makes the system easier to use B. ?diagnoses and corrects errors in an operational system C. ?involves changing an operational system to make it more efficient, reliable, or maintainable D. ?requires analysis of areas where trouble is likely to occur
________ is used to analyze large amounts of data and identify unseen patterns or trends.
Fill in the blank(s) with the appropriate word(s).