//Name: 
//
// Date: Feb. 10, 2011


public class School
{
    // behavior
    public void goUntilDead (Student s)
    {
        System.out.println("Starting up with " + s.getName());
        while (s.isAlive())
        {
            System.out.println("  energy = " + s.getEnergy());     
            s.live();
            System.out.println();
        }
        System.out.println();
    }


    // main
    public static void main (String[] args)
    {
        School school = new School();

        Student normal = new Student("Pat");
        Student duke = new DukeStudent("Chris");
        Student cosmic = new CosmicStudent("Sam");

        school.goUntilDead(normal);
        school.goUntilDead(duke);
        school.goUntilDead(cosmic);
    }
}
