import java.util.*; public class DupHashtable implements Enumeration { // Put a key-value combination into the hashtable. public void put (Object key, Object value) { } // Given a key, return the (zero, one or many) values // associated with the key. public LinkedList get (Object key) { } // Return the number of values stored. public int size () { } // Return an Enumeration of values in the hashtable. // This interface is to be implemented by DupHashtable itself. public Enumeration allValues () { } // One of the two methods in the Enumeration interface. public boolean hasMoreElements () { } // One of the two methods in the Enumeration interface. public Object nextElement () { } // Some testing ... public static void main (String[] argv) { // Test 1: DupHashtable dup = new DupHashtable (); dup.put ("A", "AAA"); printTable (dup); // Test 2: dup = new DupHashtable (); dup.put ("A", "AAA"); dup.put ("B", "BBB"); dup.put ("C", "CCC"); printTable (dup); // Test 3: dup = new DupHashtable (); dup.put ("A", "AAA"); dup.put ("B", "BBB"); dup.put ("C", "CCC"); dup.put ("A", "AAAAA"); dup.put ("C", "CCCCC"); printTable (dup); } public static void printTable (DupHashtable dup) { System.out.println ("Hashtable with " + dup.size() + " values: "); Enumeration e = dup.allValues (); while (e.hasMoreElements()) { System.out.println (e.nextElement()); } } }