8.1 In the previous chapter exercises the Car and GreenCar classes were updated so that when logical conditions were violated, exceptions were thrown. Add new ApplicationException-derived classes that will be thrown instead.

8.2 How does the use of user-defined exceptions change the Try-Catch blocks on the client-side code? Can you code the UDE and throw them so that the client code does not need to add more Catch statements?

8.3 To improve the performance of the client code, there may be cases where If statements may replace Try-Catch blocks, can you locate at least one such case, and why checks are better than Catches?

8.4 How would you reduce Try-Catch blocks and use more centralized EH code?

8.5 What would be a good situation be where the Car and GreenCar classes would return values indicating errors vs. throwing exceptions?

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.