Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is a question from C++ Programming From Problem Analysis To Program Design

ID: 3674155 • Letter: T

Question

This is a question from C++ Programming From Problem Analysis To Program Design 7th Edition by D.S Malik.

Define a class Doctor that is derived from class Employee. Add properties specific to the class Doctor. For example, a Doctor record has the doctor’s specialty (such as “pediatrician,” “Obstetrician,” “General practitioner,” etc., so use type string) and office visit fee (use type double). Be sure your class has a reasonable complement of constructors, accessor, and mutator member functions, an overloaded print function. Write a driver program to test all your functions.

Please Give complete code that works in visual studio.

Explanation / Answer

Doctor whose objects are records for a clinic doctors. Derive this class from the class Person given in Doctor record has the doctor 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.

Further, define two classes: Patient and Billing, whose objects are records for a clinic. Derive Patient from the class Person given in . A Patient record has the patient name (defined in the class Person) and identification number (use the type String). A Billing object will contain a Patient object and a Doctor object. Give your classes a reasonable complement of constructors and accessor methods, and an equals method as well. Write a test program that creates at least two patients, at least two doctors, and at least two Billing records and then displays the total income from the Billing records