Question: java For Unit 7 Submit the modified testException package by the due date 1) Create a copy of the testLoader package name it testException 2)
For Unit 7 Submit the modified testException package by the due date 1) Create a copy of the testLoader package name it testException 2) Modify your parameter constructors to call your set methods. This will cause validation of the parameter. 3) Create an exception class named TractorException. 4) Modify your setters to throw TractorException if invalid values are passed in. You may also need to add a throws clause to your parameter constructors. This way we will not have any print methods in our Tractor object defining class 5) Modify your main method to try and catch exceptions. It should catch TractorExceptions and general Exceptions and display an appropriate message. For Unit 7 Submit the modified testException package by the due date 1) Create a copy of the testLoader package name it testException 2) Modify your parameter constructors to call your set methods. This will cause validation of the parameter. 3) Create an exception class named TractorException. 4) Modify your setters to throw TractorException if invalid values are passed in. You may also need to add a throws clause to your parameter constructors. This way we will not have any print methods in our Tractor object defining class 5) Modify your main method to try and catch exceptions. It should catch TractorExceptions and general Exceptions and display an appropriate message
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
