//******************************************************************** // Academia.java Author: Lewis and Loftus // // Demonstrates inheritance from the Object class. //******************************************************************** class Academia { //----------------------------------------------------------------- // Creates objects of two student types, prints some information // about them, then checks them for equality. //----------------------------------------------------------------- public static void main (String[] args) { Student susan = new Student ("Susan", 5); GradStudent frank = new GradStudent ("Frank", 3, "GTA", 8.75); System.out.println (susan); System.out.println (); System.out.println (frank); System.out.println (); if (! susan.equals(frank)) System.out.println ("These are two different students."); } }