ICS 211 Homework A04: Implement ListIterators for both the ArrayList and DoubleLinkedList Classes.

Modify your MyArrayList and MyLinkedList classes from the previous two assignments to include a ListIterator. Use the following ListIterator interface:

public interface ListIterator<E> {
  boolean hasNext(); // Returns true if this list iterator has more elements while traversing in the forward direction.
  boolean hasPrevious(); // Returns true if this list iterator has more elements while traversing in the reverse direction.
  E next(); // Returns the next Element.
  int nextIndex(); // Returns the index of the next element.
  E previous(); // Returns the previous Element
  int previousIndex(); // Returns the index of the previous element.
}

Testing

Please thoroughly test your code and briefly discuss your testing strategy. Make sure that you test the different sorting algorithms. Turn in all your test code.

Turning in the Assignment

The assignment is due on Friday at 11:59pm. You may turn it in early. If you haven’t completed the assignment by 11:58, turn in what you have. Getting partial credit is much better then no credit.

  1. Conduct a personal review of your code before turning it in. Does you code follow the Java Coding Standard? Is it clear and well commented?
  2. Test your code.
  3. Sign into Laulima, then navigate to the ICS211 site. In the left hand side of the site, there is an Assignments tab/link. Click on it and view all of the posted assignments. Select the assignment that you want to turn in and attach your files and accept the honor pledge to submit the assignment.