/** * CSE 373, Winter 2011, Jessica Miller * An client program to test our StringHashSet. */ public class StringSetTest { public static void main(String[] args) { StringSet set = new StringHashSet(); set.add("Kona"); set.add("Daisy"); set.add("Michele"); set.add("Alan"); set.add("Toni"); set.add("Martin"); set.add("Meghan"); set.print(); System.out.println(); System.out.println("Alan? " + set.contains("Alan")); System.out.println("Michele? " + set.contains("Michele")); System.out.println("Toni? " + set.contains("Toni")); System.out.println("Jessica? " + set.contains("Jessica")); System.out.println("Ryan? " + set.contains("Ryan")); System.out.println("Tyler? " + set.contains("Tyler")); System.out.println(); System.out.println("Alan removed? " + set.remove("Alan")); set.print(); System.out.println(); System.out.println("Martin removed? " + set.remove("Martin")); set.print(); System.out.println(); System.out.println("Kona removed? " + set.remove("Kona")); set.print(); System.out.println(); System.out.println("Tyler removed? " + set.remove("Tyler")); set.print(); System.out.println(); } }