import java.util.Scanner;

public class InheritanceDemo {

    public static final Scanner KBD = new Scanner(System.in);

    public static void main (String [] args) {
        System.out.println();

        // basic person doing personny things
        Person p = new Person("Pat");
        System.out.println("p == " + p);
        p.setName("Pat Patterson");
        System.out.println("p == " + p);

        pause();

        // basic student doing studenty things 
        // (including personny things)
        Student s = new Student("Warren");
        System.out.println("s == " + s);
        s.setName("Warren Peace");
        s.setGrade(90);
        System.out.println("s == " + s);
        System.out.println(s.getName() + "'s grade is " + s.getGrade());

        pause();

        // basic undergrad doing undergraddy things 
        // (including studenty & personny things)
        Undergrad u = new Undergrad("Stu");
        System.out.println("u == " + u);
        u.setName("Stu Dent");
        u.setGrade(100);
        u.setYear(2);
        System.out.println("u == " + u);
        System.out.println(u.getName() + "'s grade is " + u.getGrade());
        System.out.println(u.getName() + " is in year " + u.getYear());

        pause();

        // Activity 3
        /* -- delete this line (and the one marked below) for activity 3 --
        Lecturer l1 = new Lecturer("Zachary");
        Lecturer l2 = new Lecturer("Wilhelmina", 11017.00);
        l1.writeOutput();
        l2.writeOutput();
        pause();
        l1.setName("Zack");
        l1.setStipend(10800.00);
        l1.writeOutput();
        pause();
        System.out.printf("%s's stipend is $%,4.2f.\n", 
                            l1.getName(), l1.getStipend());        
        System.out.printf("%s's stipend is $%,4.2f.\n", 
                            l2.getName(), l2.getStipend());        
        pause();
        -- delete this line (and the one marked above) for activity 3 -- */
    }

    private static void pause() {
        System.out.print("\npress enter...");
        KBD.nextLine();
        System.out.println();
    }

}
