Lab Consists Following Files Hospitaljava Driver Hospitalemployeejava Super Class Doctorja Q37235102

This lab consists ofthe following files:

  1. Hospital.java (driver)
  2. HospitalEmployee.java (super class)
  3. Doctor.java (subclass of HospitalEmployee)
  4. Nurse.java (subclass of HospitalEmployee)

Report for a – d:

  • where in the code you get an error (list the methodname) and
  • what type of error; compiling orrun-time.
  • Explain what you think caused errors or changes inoutput (based on the concepts we studied in class).

a. do 1 and 2

1. (change HospitalEmployee.java )change the Employee issuePayCheck( ) method to beprivate in class HospitalEmployee

              2. (hospital.java) Add the following code as the last lines in themain():

HospitalEmployee[] he = newHospitalEmployee[2];

      he[0] =Lyons;

      he[1] =Nick;

      for(int i = 0; i

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.