Define a class named Doctor whose objects are records for a clinic’s doctors. Derive this class from the class Person given in Listing 8.1. A Doctor record has the doctor’s name—defined in the class Person—a specialty as a string (for example Pediatrician, Obstetrician, General Practitioner, and so on), and an office visit fee (use the type double). Give your class a reasonable complement of constructors and accessor methods, and an equals method as well. Write a driver program to test all your methods.
This project is a simple variation of Practice Program 1. Note that two of the Doctor constructors have the same two parameter types, String and double, but in opposite order, so they are clearly distinct to the compiler.
See the code in Doctor.java and DoctorTest.java.
Computer Science & Information Technology
You might also like to view...
A(n) ________ is a powerful, interactive data-mining feature that enables you to summarize and analyze data, especially helpful when working with large datasets
Fill in the blank(s) with correct word
Computer Science & Information Technology
Which program is an example of a graphing tool that could be used show everything about specific switches?
A. NetFlow B. Cacti C. Syslog D. Cisco Network Assistant (CNA)
Computer Science & Information Technology