Question: Consider the remove() method from the Java Iterator interface. The remove() method has a complex precondition on the state of the Iterator, and the programmer
Consider the remove() method from the Java Iterator interface. The remove() method has a complex precondition on the state of the Iterator, and the programmer can choose to detect violations of the precondition and report them as IllegalStateException.
1. Formalize the precondition.
2. Find (or write) an implementation of an Iterator. The Java Collection classes are a good place to search.
3. Develop and run CACC tests on the implementation.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
