CSC 232 - Introduction to Computer Science II
Lab 3


Lab Objectives

  1. Gaining more experience with the ArrayList class.
  2. Gaining more experience working with generics.

Download and modify the KWArrayList<E> class as follows:

  1. Implement a find method for the KWArrayList<E> class with an interface similar to that of the indexOf() method of java.util.ArrayList<E>.
  2. Provide a constructor for the class KWArrayList<E> that accepts an int argument that represents the initial array capacity. Use this instead of INITIAL_CAPACITY.
  3. Add a main method to test some of the methods of the KWArrayList<E> class. Make sure to test the two methods you added.

Make sure to write your methods at the beginning of the body of the KWArrayList<E> class after the fields. Do the following before leaving the lab:

  1. Upload an electronic copy of the source code to a subfolder named LAB3 in your csc232 eccentric upload folder
  2. Demonstrate your program to the instructor
  3. Turn in a print out of only the three methods you added