how to implement class Person?,
January 30, 2010 at 6:38 AM
How to Implement a superclass Person. Make two classes, Student and Lecturer, that inherit from Person. A person has a name and year of birth. A student has a degree program and a lecturer has a salary. Write the class definitions for all classes. Each class must have a constructor and a toString() method that prints the related attributes. Also, write a program name TestQ2 that instantiates an object of each of these classes and invokes the toString() method of each of these object.