Created
July 29, 2018 16:32
-
-
Save raulmoyareyes/c4b108c2777f44ebc62b683f97100ba8 to your computer and use it in GitHub Desktop.
[ Wrong ] - Interface Segregation Principle
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 Car { | |
startEngine() {} | |
accelerate() {} | |
backToThePast() {} | |
backToTheFuture() {} | |
} | |
class Seat extends Car { | |
startEngine() { | |
// start engine... | |
} | |
accelerate() { | |
// accelerate... | |
} | |
} | |
class DeloRean extends Car { | |
startEngine() { | |
// start engine... | |
} | |
accelerate() { | |
// accelerate... | |
} | |
backToThePast() { | |
// back to the past... | |
} | |
backToTheFuture() { | |
// back to the future... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment