Question: A java program 4. Define a class named Doctor whose objects are records for a clinic's doc- tors. Derive this class from the class Person
4. Define a class named Doctor whose objects are records for a clinic's doc- tors. Derive this class from the class Person given in Listing 8.1. A Doctor a string (for example Pediatrician, Obstetrician, General Practitioner, and so on), and an office-visit fee (use the type double). Give your class a rea- sonable complement of constructors and accessor methods, and an equals method as well. Write a driver program to test all your methods
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
