// 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 object oriented! // list1.size++; // very easy to forget; tie it to adding a value list1.add(23); // [23] list1.add(5); // [23, 5] list1.add(1, 78); // [23, 78, 5] list1.add(17); // [23, 78, 5, 17] list1.remove(1); // [23, 5, 17] System.out.println(list1); ArrayIntList list2 = new ArrayIntList(); list2.add(6); System.out.println(list2); System.out.println(list1.get(1)); list1.set(1, 6); System.out.println(list1.get(1)); System.out.println(list1.size()); System.out.println(list2.isEmpty()); } }