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