// Helene Martin, CSE 143 // Client program to test the ArrayIntList functionality public class ArrayIntListClient { public static void main(String[] args) { ArrayIntList list1 = new ArrayIntList(); // list1.elementData[0] = 23; // not the object-oriented way! // list1.size++; // this should always happen when an element is added // list1.size = -9999; // fields should be private to guard against bad // clients list1.add(23); // [23] System.out.println(list1); list1.add(34); // [23, 34] list1.add(67); // [23, 34, 67] System.out.println(list1); list1.add(1, 78); // [23, 78, 34, 67] System.out.println(list1); ArrayIntList list2 = new ArrayIntList(); // [] System.out.println(list2); } }