Created
May 13, 2019 13:42
-
-
Save BetterProgramming/912648f003668b9dbc8cd891e754aba3 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 class Mocha extends CondimentDecorator { | |
public Mocha(Beverage b) { | |
beverage = b; | |
} | |
@Override | |
public String getDescription() { | |
return beverage.getDescription() + ", Mocha"; | |
} | |
@Override | |
public int cost() { | |
return beverage.cost() + 50; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment