Search for question
Question

Purpose

A lot of things can go wrong when we run a program. The challenge is to keep the program going despite errors so that we can

execute as much of the program as possible without causing any more problems.

In this assignment, we will use Exceptions to handle as many possible errors that may occur when using the Assignment 3 program.

We want our Assignment 4 program to accomplish everything the Assignment 3 program can and be as resilient as possible; ideally,

our Assignment 4 program will never crash.

Instructions

1. First, write a Word document named Assign3CrashReport with a list of all the possible ways your Assignment 3 program can

crash. What bad inputs-e.g., bad filenames, file contents, user inputs-can cause the program to crash or malfunction?

2. Make a complete copy of your Assignment 3 program and rename the main class "Assign4Main.java".

3. Next, use custom Exception classes-there's no limit to how many you can have to handle each possible error so that your

program tries to recover from every bad input.

4. In a second document named Assign4Exception Tests, list each Exception class you created and what problem it solves.