
public class PersonTest
{  
   public static void main(String[] args)
   {  
      Person[] people = new Person[2];

      // fill the people array with Student and Employee objects
      people[0] 
         = new Employee("Harry Hacker", 50000);
      people[1] 
         = new Student("Maria Morris", "computer science");

      // print out names and descriptions of all Person objects
      for (int i = 0; i < people.length; i++)
      {
         System.out.println(people[i].getName() + ", "
            + people[i].getDescription());
      }
   }
}

