Last active
July 29, 2018 16:59
-
-
Save raulmoyareyes/3bccbe178b4ebc26b9b6bea94ae01ea6 to your computer and use it in GitHub Desktop.
[ Wrong ] - Dependency Inversion 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 Milk { | |
// implementation | |
} | |
class Coffee { | |
constructor(milk) { | |
this.milk = milk | |
} | |
cost() { | |
// calculate the cost | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment