Homework 1
CS203, Spring 2006


Due: Wednesday, April 19

Please upload your source code files using CSNS. Note that file uploading will be disabled automatically after 11:59PM of the due date, so please turn in your work on time.

1. (30pt) Complete the LinkedList class. Your implementation of the LinkedList class should pass the tests in ListTest.java with the correct results. Note that you may not change the code in ListTest.java except the names of the imported packages.

2. (50pt) Write a DoubleLinkedList class (including a DoubleLinkedListIterator class) that implements the List interface. The main difference between a double-linked list and a linked list is that a node in a double-linked list has two references: one for the next node in the list and one for the previous node in the list, for example:

[Double Linked List]

And again your DoubleLinkedList class must pass the tests in ListTest.java with the correct results.