public static void main(String args[]) { // test function // requires that you import java.util.Random; final int LARGE_INTEGER = 1000; final int NUMBER_OF_CHECKS = 20; Collection box = new Collection(); // Check Empty (True) System.out.println("isEmpty? (should be T) "+ box.isEmpty()); // Check isPresent (False) System.out.println("isPresent(20)? (should be F) "+ box.isPresent(20)); // Attempt to remove from an empty Collection; shouldn't crash box.remove(20); box.insert(20); // Check Empty (False) System.out.println("isEmpty? (should be F) "+ box.isEmpty()); // Check isPresent (True) System.out.println("isPresent(20)? (should be T) "+box.isPresent(20)); // Check isPresent (False for another element) System.out.println("isPresent(10)? (should be F) "+box.isPresent(10)); System.out.println("Removing 20"); box.remove(20); // Check Empty (True) System.out.println("isEmpty? (should be T) "+ box.isEmpty()); // Check isPresent (False) System.out.println("isPresent(20)? (should be F) "+box.isPresent(20)); // removing non-present element; should not crash (a warning is ideal) System.out.println("Attempting to remove 20 again"); box.remove(20); //clear System.out.println("Clearing the Collection"); box.makeEmpty(); // Check Empty (True) System.out.println("isEmpty? (should be T) "+ box.isEmpty()); // Insert a large number of elements System.out.print("Inserting "); for (int i=0; i