import SimpleOutput;
import Entry;

public class Faculty extends Entry {
    // Faculty have four special fields
    private String office;
    private int extension;
    private String dept;
    private int firstYear;

    Faculty (String first, String last, String addr, String room,
             int ext, String department, int yr) {
        super(first, last, addr);
        office = room;
        extension = ext;
        dept = department;
        firstYear = yr;
    }

    public void print (SimpleOutput out) {
        super.print (out);
        out.println ("   Office:  " + office 
                     + "\tOffice Extenstion:  " + extension);
        out.println ("   Department:  " + dept);
        out.println ("   First Year at Grinnell:  " + firstYear);
    }

    public static void main (String [] argv) {
        // suit of tests for Student
        SimpleOutput myOut = new SimpleOutput();

        // set up three objects
        Faculty A = new Faculty ("Janet", "Gibson", "gibson@grinnell.edu",
                                 "Science 0420", 3168,
                                 "Psychology", 1989);
        Faculty B = new Faculty ("Henry", "Walker", "walker@cs.grinnell.edu",
                                 "Science 2420", 4208, 
                                 "Mathematics and Computer Science", 1973);
        Faculty C = new Faculty ("John", "Stone", "stone@math.grin.edu",
                                 "Science 2418", 3181,
                                 "Mathematics and Computer Science", 1983);
        Faculty D = new Faculty ("Samuel", "Rebelsky", "rebelsky@cs.grin.edu",
                                 "Science 2427", 4410,
                                 "Mathematics and Computer Science", 1997);

        // print objects
        myOut.println();
        myOut.println ("Person A:");
        A.print(myOut);
        myOut.println ("Person B:");
        B.print(myOut);
        myOut.println ("Person C:");
        C.print(myOut);
        myOut.println ("Person D:");
        D.print(myOut);

        // since methods equals and comesBefore are inherited, 
        //     testing may or may not be done 

        // check comparisons
        // myOut.println();
        // myOut.println ("Results of equals");
        // myOut.println ("\tA\tB\tC");
        // myOut.println ("A\t"+A.equals(A)+"\t"+A.equals(B)+"\t"+A.equals(C));
        // myOut.println ("B\t"+B.equals(A)+"\t"+B.equals(B)+"\t"+B.equals(C));
        // myOut.println ("C\t"+C.equals(A)+"\t"+C.equals(B)+"\t"+C.equals(C));
         
        // myOut.println ("Results of comesBefore");
        // myOut.println ("\tA\tB\tC");
        // myOut.println ("A\t" + A.comesBefore(A) + "\t"
        //                + A.comesBefore(B) + "\t" + A.comesBefore(C));
        // myOut.println ("B\t" + B.comesBefore(A) + "\t"
        //                + B.comesBefore(B) + "\t"+B.comesBefore(C));
        // myOut.println ("C\t" + C.comesBefore(A) + "\t"
        //                + C.comesBefore(B) + "\t"+C.comesBefore(C));
    }
}

