27 lines
453 B
C++
27 lines
453 B
C++
|
/*
|
|||
|
* Mocha.hpp
|
|||
|
*
|
|||
|
* Created on: 1 нояб. 2021 г.
|
|||
|
* Author: alexander
|
|||
|
*/
|
|||
|
|
|||
|
#pragma once
|
|||
|
|
|||
|
#include "CondimentDecorator.hpp"
|
|||
|
|
|||
|
class Mocha: public CondimentDecorator
|
|||
|
{
|
|||
|
public:
|
|||
|
Mocha(Beverage *beverage): CondimentDecorator(beverage) {}
|
|||
|
|
|||
|
std::string getDescription() const override
|
|||
|
{
|
|||
|
return beverage->getDescription() + ", Mocha";
|
|||
|
}
|
|||
|
|
|||
|
double cost() const override
|
|||
|
{
|
|||
|
return 0.20 + beverage->cost();
|
|||
|
}
|
|||
|
};
|