Create a program to test all methods


Discuss the below:

Q: Give the definition of a class named Doctor whose objects are records for a clinic's doctors. This class will be a derived class of the class SalariedEmployee given in Display 7.5. A Doctor record has the doctor's specialty (such as "Pediatrician", "Obstetrician", "General Practitioner", and so forth; so use the type String), and office visit fee (use type double). Be sure your class has a reasonable complement of constructors, accessor and mutator methods, and suitably defined equals, and toString methods. Write a program to test all your methods.

You should implement the following methods:

public Doctor()
public Doctor(String theName, Date theDate, double theSalary,
String theSpecialty, double theVisitFee)
public Doctor(Doctor orig)
public String getSpecialty()
public void setSpecialty(String theSpecialty)
public double getVisitFee()
public void setVisitFee(double theVisitFee)
public boolean equals(Doctor other)

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a program to test all methods
Reference No:- TGS01935003

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)