Question

Implement class Doctor that inherits from Person. Declare the following private attributes: int publications, Boolean head Of Dept. Implement the to String() method that prints all the information about a

Doctor,including the inherited attributes. Implement the method isHeadofDept () that increments the base Salary with 100KD if the doctor is a head of department Implement a method calc Salary() that calculates and returns the total Salary of a Doctor. If the doctor has more than 5 publications, increment the salary with 50KD for every publication. If the doctor is head of department, increment the base Salary with another 100KD. Implement method compare To(Doctor d) that compares and returns the doctor with the hightest nr of publications

Question image 1Question image 2Question image 3Question image 4Question image 5