Last active
April 10, 2016 03:40
-
-
Save christopherperry/c75391bbdf52e2873844e1e5b78843cf to your computer and use it in GitHub Desktop.
Coffee Maker Dependency Inversion Example
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
package coffee.maker; | |
import coffee.maker.heater.ElectricHeater; | |
import coffee.maker.pump.Thermosiphon; | |
public class CoffeeMaker { | |
private final ElectricHeater heater; | |
private final Thermosiphon thermosiphon; | |
public CoffeeMaker() { | |
heater = new ElectricHeater(); | |
thermosiphon = new Thermosiphon(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment