A developer is documenting three Java failure classes, using one supporting relationship as context. The relevant inheritance relationships are given below; extends names a class's immediate parent.
IOException extends Exception IllegalArgumentException extends RuntimeException RuntimeException extends Exception AssertionError extends Error
Complete the report. Use checked or unchecked for the first two blanks and the appropriate parent class name for the last blank.
Unlock full course notes by signing up
Tracing output up to an off-by-one exception
The following Java statements run inside main with no exception handling. The program prints some numbers and then stops with a runtime exception.
What is the last number printed before the program stops? Give your answer as a whole number.
Exceptions and silent errors in parcel averages
A parcel service calculates the average number of labels per parcel when distributing 10 labels. A tester evaluates each Java method independently for every row below. A failure in one test does not prevent any other test from running.
The (double) syntax is a cast. For nonzero parcel counts, compare returned values with the exact mathematical average of 10 divided by the parcel count. Ignore ordinary floating-point rounding.
Report these four quantities as exact whole numbers of runs: