Homework 6 Grading Guide
On many of these problems you will need to use your judgement to decide
how much partial credit to assign, since it's hard to predict in advance
what types of mistakes will be made on the various problems.
- (5 points)
- (5 points)
- (5 points)
- (5 points)
- (5 points)
- (35 points): Eyeball the source code and make sure that
exception handlers were used to handle the two exceptions in this
problem. Deduct the full 35 points for not using exception handlers.
Run the program and check the following situations:
- 6 points: The program runs correctly on valid input
(e.g., 10 30 40)
- 3 points: The program gives an error message on a negative
number (e.g., 10 -1 40) and sums the rest of the line
- 12 points: If the program is initially given a bad filename,
it repeatedly prompts the user for a valid filename until
it is given one.
- 14 points: The program gracefully handles a non-integer in the
input by:
- 7 points: printing a nice error message
- 7 points: summing the remaining items in the line and
printing their sum. Try a test case that has both a single
non-integer, and multiple non-integers.
- (40 points):
- (32 points) Execution: Run the jar file and make sure that
the following situations are handled properly:
- (8 points) Valid input
- (12 points) Queue Overflow
- (12 points) Queue Underflow (removing from an empty queue)
- Eyeball the code and make sure that
- (5 points) The scanner objects used to read lines are
closed after each line of input is read. If there are multiple
close statements, rather than a single one in a finally clause,
then deduct 4 points.
- Exception handlers are used for error handling: deduct the
full 40 points for not using exception handlers
- (3 points) Exceptions are thrown out of the queue class and handled
by the driver class.