const { Employee } = require("./employee"); class Boss extends Employee { constructor(name, accreditationLevel) { super(name); this.accreditationLevel = accreditationLevel; } getAccreditation() { return this.accreditationLevel; } fire(target) { if (!(target instanceof Employee)) { console.log("I cannot fire that!"); return false; } else if ( !(target instanceof Boss) || target.getAccreditation() < this.accreditationLevel ) { console.log(target.getName() + " you are fired!"); return true; } else { console.log("I cannot fire someone superior to me!"); return false; } } } module.exports = { Boss, };