On the handouts of the six files
we used in class on Monday (they are the same as the six .java files linked below), study the code
dealing with exceptions.
Which methods in which classes handle exceptions?
Which methods throw them to a method higher in the call chain?
Which exception classes are named in the different catch clauses?
What kind of error causes each of the exceptions types to be thrown?
Download, then compile the files necessary to run the program.
As you will see when you look at PDConsoleApplication.java, for simplicity
I hard-coded a filename for a data file in, so that I did not have to
bother with making BlueJ accept a command line argument.
The data file has only one name and number in it. You will probably want to change it.
Run the program.
After you have the program running correctly, try to make the
errors that will cause each of the exceptions thrown in the program
to crash the program. Note the call stack for each program crash, so
you can see exactly where the program terminated. What was the longest call stack
you saw?