This repository has been archived on 2022-11-09. You can view files and clone it, but cannot push or open issues or pull requests.
patterns-old/lesson_3/Mocha.hpp

27 lines
453 B
C++
Raw Normal View History

2021-11-01 18:04:47 +00:00
/*
* 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();
}
};