CSC 232 - Introduction to Computer Science II
Lab 3
Lab Objectives
- Gaining more experience with the ArrayList class.
- Gaining more experience working with generics.
Download and modify the KWArrayList<E>
class as follows:
- Implement a find method for the KWArrayList<E> class with an interface
similar to that of the indexOf() method of java.util.ArrayList<E>.
- 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.
- 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:
- Upload an electronic copy of the source code to a subfolder named LAB3
in your csc232 eccentric
upload folder
- Demonstrate your program to the instructor
- Turn in a print out of only the three methods you added