Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created May 13, 2019 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BetterProgramming/912648f003668b9dbc8cd891e754aba3 to your computer and use it in GitHub Desktop.
Save BetterProgramming/912648f003668b9dbc8cd891e754aba3 to your computer and use it in GitHub Desktop.
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