import SimpleOutput;
import BetterDirectory;

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

        // create Directory and SimpleOutput objects
        BetterDirectory dir = new BetterDirectory();
        SimpleOutput out = new SimpleOutput();

        // place names in the directory
        dir.add ("Arnold Adelberg",  "4201");
        dir.add ("Marc Chamberland", "4207");
        dir.add ("Pamela Ferguson",  "4661");  
        dir.add ("Eugene Herman",    "4202"); 
        dir.add ("Charles Jepsen",   "4203");
        dir.add ("Emily Moore",      "4205");
        dir.add ("Thomas Moore",     "4206");
        dir.add ("Samuel Rebelsky",  "4410");
        dir.add ("John Stone",       "3181");
        dir.add ("Henry Walker",     "4208");
        dir.add ("Royce Wolf",   "on-leave");

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

        // delete name from directory
        dir.remove ("Arnold Adelberg");

        // print out all keys
        dir.printNames();
        
        // print out all values
        dir.printNumbers();

        // print size of directory
        out.println ("the number of entries in the directory is: "
                     + dir.size());

    } // main    
} // DirectoryMain3

