Lab 9. Generics
CS203, Spring 2006


1. (30pt)  Convert ArrayList to a generic class ArrayList<T>. All the interfaces and classes related to ArrayList, e.g. List, AbstractList, Iterator, and ListIterator, must be converted as well.

2. (10pt)  Write some test code for ArrayList<T> to show that it works correctly, and that static type checking can catch the error when an object of the wrong type is to be inserted into the list.

3. Turn in all the source code files through CSNS.