public class DemonstrateHumans { public static void main(String[] args) { HumanBeing hb = new HumanBeing(); Employee empl = new Employee(); CollegeProfessor prof = new CollegeProfessor(); Secretary sec = new Secretary(); HumanBeing[] humans = {hb, empl, prof, sec}; for (int i = 0; i < humans.length; i++) { System.out.println(humans[i]); humans[i].eat(); humans[i].sleep(); humans[i].speak(); //humans[i].work(); System.out.println(); } /* System.out.println(hb); hb.eat(); hb.sleep(); hb.speak(); // hb.work(); System.out.println(); System.out.println(empl); empl.eat(); empl.sleep(); empl.speak(); empl.work(); System.out.println(); System.out.println(prof); prof.eat(); prof.sleep(); prof.speak(); prof.work(); */ } }