The Task

The IntArray class contains many error statements hidden throughout its implementation. Your task is to make at least 12 of them print out. You must find at least one error and one edge case. Errors are inputs to a method that violate its preconditions, and edge cases are inputs that, while technically valid, do not make very much sense to use as input, or they sit right on the boundary between valid and invalid inputs. You will need to look at the documented preconditions to figure out how to trigger these error and edge cases.

You will need to think about how to break the code, rather than make it work. This is a strategy you should employ when testing your own programs, in addition to simply checking if they work.