Last active
March 24, 2022 19:41
-
-
Save jpwco/b5fe58b0df5bba79bff3efb5eadc804e to your computer and use it in GitHub Desktop.
Refactoring example #1 after
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Department { | |
name; | |
printName() { | |
console.log("Department name: " + this.name); | |
} | |
printMeeting() { | |
console.log("The Accounting Department meets each Monday at 10am."); | |
} | |
} | |
class AccountingDepartment extends Department { | |
generateReports() { | |
console.log("Generating accounting reports..."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment