26 lines
440 B
D
26 lines
440 B
D
module decorator.coffee.whip;
|
|
|
|
import decorator.coffee.beverage;
|
|
import decorator.coffee.condimentdecorator;
|
|
|
|
class Whip : CondimerDecorator
|
|
{
|
|
private:
|
|
Beverage beverage;
|
|
public:
|
|
this(Beverage beverage)
|
|
{
|
|
this.beverage = beverage;
|
|
}
|
|
|
|
override string getDescription()
|
|
{
|
|
return beverage.getDescription() ~ ", Whip";
|
|
}
|
|
|
|
override double cost()
|
|
{
|
|
return .10 + beverage.cost();
|
|
}
|
|
}
|