7.1 In the previously designed Car and GreenCar classes, there were situations where the code checks for logical errors. For example, Gas level must be positive, Vin Number must be alphanumeric only, or Miles driven must be positive.

  • Add code to check for these logical errors, so that when an error occurs, the class code would issue an errormessage via Messagebox.
  • Now to contrast that with EH and replace every Messagebox showing an error from Car or GreenCar with a Throw New Exception statement. Generate an error message in the Throw statement that describes the error.
  • Step 2 above, will require that the client code hendle these exceptions using Try-Catch statement. Add Try-Catch statement where the code is expected to cause exception in the client code.
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.