/** TestGenerations test drives Person, Mother, Grandmother, and Aunt
 */
public class TestGenerations {
  public static void main(String[] args) {
    // declare some Persons
    Person p;
    Mother m;
    Grandmother g;
    Aunt a;

    m= new Mother("Alice", "Margaret, Eleanor, Susan");
    // OUR EXAMPLE COMMENTS
    // A new instance of class Mother created
    // Mother(String n, String dL) (rule 1)
    // Person(String n) (rule 6)
    // instance variable name refers to "Alice"
    // instance variable daughterList refers to
    // "Margaret, Eleanor, Susan"
    // Assignment allowed: both side of type Mother (rule 2)

    p= new Person("Alice");
    // YOUR COMMENTS HERE







    g= new Grandmother("Alice", "Margaret, Eleanor, Susan",
		       "Rachel, Katie, Hannah");
    // YOUR COMMENTS HERE









    a= new Aunt("Irene", "Susan, Shirley, Patricia");
    // YOUR COMMENTS HERE







    p.m1();
    // YOUR COMMENTS HERE




    
    m.m2();
    // OUR EXAMPLE COMMENTS
    // m2() of class Mother (rule 1)
    // toString() of class Person (rule 7)
    // output: "Name: Alice"

    g.m3();
    // YOUR COMMENTS HERE






    m= g;
    // YOUR COMMENTS HERE



    m.m2();
    // YOUR COMMENTS HERE





    p.m4(2);
    // OUR EXAMPLE COMMENTS
    // compile-time error: p is of type Person, which has
    // no method m4(int) (rule 5)

    p= a;
    // OUR EXAMPLE COMMENTS
    // Assignment allowed: p's type is superclass
    // of a's type (rule 2)



    ((Aunt)p).m4(2);
    // YOUR COMMENTS here







    m.m1();
    // YOUR COMMENTS HERE






    m= (Mother) p;
    // YOUR COMMENTS HERE





    a= (Aunt) m;
    // YOUR COMMENTS HERE

    



  }
}


