// CSE 143, Summer 2012 // A simple client programm that we used to test oru ArrayIntList in lecture // For a more complete testing example see the last couple slides from 6/22 public class ListClient { public static void main (String [] args) { ArrayIntList list = new ArrayIntList(-1); list.add(42); list.add(3); list.add(3); System.out.println("list with 3 elements nad larger capacity: " + list); list.add(3); list.add(3); list.add(3); list.add(3); list.add(0, 2); list.add(3); list.add(3); list.add(3); System.out.println("Requires the list to resize: " +list); System.out.println("Index of 42: " + list.indexOf(42)); System.out.println("Index of 2: " + list.indexOf(2)); System.out.println("Index of 3: " + list.indexOf(3)); } }