Created
April 18, 2018 19:49
-
-
Save kudapara/b28f76c9c669f5eb2bc1bfa7a2d87d49 to your computer and use it in GitHub Desktop.
Code that violates ISP
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 Shape { | |
constructor () {} | |
area () {} | |
volume () {} | |
} | |
class Triangle extends Shape { | |
constructor (base, height) { | |
this.base = base | |
this.height = height | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment