Define two classes, Patient and Billing, whose objects are records for aclinic. Derive Patient from the class Person given in Listing 8.1. A Patientrecord has the patient’s name (defined in the class Person) and identification number (use the type String). A Billing object will contain aPatient object and a Doctor object (from Practice program 2). Give yourclasses a reasonable complement of constructors and accessor methods,and an equals method as well. First write a driver program to test all yourmethods, then write a test program that creates at least two patients, at leasttwo doctors, and at least two Billing records and then displays the totalincome from the Billing records.
Define two classes, Patient and Billing, whose objects are records for a
clinic. Derive Patient from the class Person given in Listing 8.1. A Patient
record has the patient’s 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 (from Practice
classes a reasonable complement of constructors and accessor methods,
and an equals method as well. First write a driver program to test all your
methods, then 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.
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 2 images