49 lines
617 B
C++
49 lines
617 B
C++
|
/*
|
|||
|
* Cheese.hpp
|
|||
|
*
|
|||
|
* Created on: 3 нояб. 2021 г.
|
|||
|
* Author: alexander
|
|||
|
*/
|
|||
|
|
|||
|
#pragma once
|
|||
|
|
|||
|
#include <string>
|
|||
|
|
|||
|
class Cheese
|
|||
|
{
|
|||
|
public:
|
|||
|
virtual std::string toString() const = 0;
|
|||
|
|
|||
|
virtual ~Cheese() {}
|
|||
|
};
|
|||
|
|
|||
|
class MozzarellaCheese: public Cheese
|
|||
|
{
|
|||
|
public:
|
|||
|
|
|||
|
std::string toString() const
|
|||
|
{
|
|||
|
return "Shredded Mozzarella";
|
|||
|
}
|
|||
|
};
|
|||
|
|
|||
|
class ParmesanCheese: public Cheese
|
|||
|
{
|
|||
|
public:
|
|||
|
|
|||
|
std::string toString() const
|
|||
|
{
|
|||
|
return "Shredded Parmesan";
|
|||
|
}
|
|||
|
};
|
|||
|
|
|||
|
class ReggianoCheese: public Cheese
|
|||
|
{
|
|||
|
public:
|
|||
|
|
|||
|
std::string toString() const
|
|||
|
{
|
|||
|
return "Reggiano Cheese";
|
|||
|
}
|
|||
|
};
|