Last active
November 21, 2015 16:12
-
-
Save yuizho/d1d66d9153b47cf6858d to your computer and use it in GitHub Desktop.
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
public interface BrewingMethod { | |
public String brew(); | |
} |
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
public class CoffeeShop { | |
public String brewCoffee() { | |
Siphone siphone = new Siphone(); | |
return siphone.brew() + "が出来上がりました [_]P"; | |
} | |
} |
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
public class CoffeeShopApp { | |
public static void main(String... args) { | |
CoffeeShop coffeeShop = new CoffeeShopApp(); | |
coffeeShop.brewCoffee(); | |
} | |
} |
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
public class Drip implements BrewingMethod { | |
@Override | |
public String brew() { | |
return "ドリップ式コーヒー"; | |
} | |
} |
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
public class Siphon implements BrewingMethod { | |
@Override | |
public String brew() { | |
return "サイフォンでいれたコーヒー"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment