exception

1. Use the Java hierarchy you posted in week 5 (corrected based on any feedback you may have received). Add a user-defined exception that can be thrown by one of the methods as part of the validation or error checking. The main method should then create an instance of the class and call the method in such a way that the exception is thrown (e.g. invalid input or state of the system). Submit your program as an attached  .java file and post a screenshot to show that you have been able to successfully run that program. Make sure your submission adheres to the Submission Requirements document.

2. Reply to another student’s post. Suggest another path and/or method where the new exception could be thrown or suggest a different user-exception and where it could be used or suggest a path where Java built-in exception could be used. Write the main method to demonstrate the correct functionality of the additions. As you reply to the other students, try to reply to a post that does not have a reply yet, and if not; try to reply to a post with a fewer number of replies.

Be sure to create a program different from any of the programs already posted by your classmates or the examples in the class materials.

As you answer these questions, use proper Java naming convention (Camel case), name the class, attribute, and method in a meaningful way to represent the business meaning, and add comments to the Java code as applicable.

The deliverables are the Java code and the documentation. The documentation is a single Microsoft Word document, or PDF containing the screenshot of the results obtained by running the code. 


Leave a Reply

Your email address will not be published. Required fields are marked *