import SimpleOutput;
import java.util.Hashtable;
import java.util.Enumeration;

public class DirectoryMain1 {
    public static void main (String arg[]) {

        // create Hashtable and SimpleOutput objects
        Hashtable table = new Hashtable();
        SimpleOutput out = new SimpleOutput();

        // place names in the directory
        table.put ("Arnold Adelberg",  "4201");
        table.put ("David Bishop",     "4449");
        table.put ("Marc Chamberland", "4207");
        table.put ("Pamela Ferguson",  "4661");  
        table.put ("Ben Gum",          "3127");
        table.put ("Eugene Herman",    "4202"); 
        table.put ("Chris Hill",       "4347");
        table.put ("Charles Jepsen",   "4203");
        table.put ("Emily Moore",      "4205");
        table.put ("Thomas Moore",     "4206");
        table.put ("Samuel Rebelsky",  "4410");
        table.put ("John Stone",       "3181");
        table.put ("Henry Walker",     "4208");
        table.put ("Royce Wolf",       "4209");

        // search table for various names
        out.println ("data for John Stone are: " 
                     + table.get ("John Stone"));
        out.println ("data for George Apostle are: " 
                     + table.get ("George Apostle"));

        // print out all keys
        out.println ("The names in the directory are: ");
        for (Enumeration e = table.keys(); e.hasMoreElements() ;) {
            out.println ("   " + e.nextElement());
        } // for
    } // main    
} // Directory
