39 lines
489 B
C++
39 lines
489 B
C++
/*
|
||
* Sauce.hpp
|
||
*
|
||
* Created on: 3 нояб. 2021 г.
|
||
* Author: alexander
|
||
*/
|
||
|
||
#pragma once
|
||
|
||
#include <string>
|
||
|
||
class Sauce
|
||
{
|
||
public:
|
||
virtual std::string toString() const = 0;
|
||
|
||
virtual ~Sauce() {}
|
||
};
|
||
|
||
class MarinaraSauce: public Sauce
|
||
{
|
||
public:
|
||
|
||
std::string toString() const
|
||
{
|
||
return "Marinara Sauce";
|
||
}
|
||
};
|
||
|
||
class PlumTomatoSauce: public Sauce
|
||
{
|
||
public:
|
||
|
||
std::string toString() const
|
||
{
|
||
return "Tomato sauce with plum tomatoes";
|
||
}
|
||
};
|