Inheritance II Unable to clear the last step


#1

Hello. I wondered if I could get some help with my code. It’s showing the error message

“Did you create a method called takeVacationDays that accepts an input and subtracts it from the remainingVacationDays property? When we call .takeVacationDays(4) on a new HospitalEmployee instance, it sets remainingVacationDays to undefined.”

Thanks for the help!

class HospitalEmployee {
  constructor(name) {
    class Doctor {
      constructor(name) {
        this._name = name;
        this._remainingVacationDays = 20;
        this._insurance = insurance;
        this.takeVacationDays();
      }
      get name() {
        return this._name;
      }
      get remainingVacationDays() {
        return this._remainingVacationDays;
      }
      takeVacationDays(daysOff) {
        this._remainingVacationDays -= daysOff; 
      }
    }
    

    class Nurse {
      constructor(name) {
        this._name = name;
        this._remainingVacationDays = 20;
        this._certifications = certifications;
        this.takeVacationDays();
				this.addCertification();
      }
      get name() {
        return this._name;
      }
      get remainingVacationDays() {
        return this._remainingVacationDays;
      }
      takeVacationDays(daysOff) {
        this._remainingVacationDays -= daysOff;
      }
  	}

  }
}

#2
class ParentClass {

}
class DerivedClass extends ParentClass {

}