88 lines
1.1 KiB
C++
88 lines
1.1 KiB
C++
/*
|
||
* Veggies.hpp
|
||
*
|
||
* Created on: 3 нояб. 2021 г.
|
||
* Author: alexander
|
||
*/
|
||
|
||
#pragma once
|
||
|
||
#include <string>
|
||
|
||
class Veggies {
|
||
public:
|
||
virtual std::string toString() const = 0;
|
||
|
||
virtual ~Veggies() {}
|
||
};
|
||
|
||
class BlackOlivesVeggies: public Veggies
|
||
{
|
||
public:
|
||
|
||
std::string toString() const
|
||
{
|
||
return "Black Olives";
|
||
}
|
||
};
|
||
|
||
class EggplantVeggies: public Veggies
|
||
{
|
||
public:
|
||
|
||
std::string toString() const
|
||
{
|
||
return "Eggplant";
|
||
}
|
||
};
|
||
|
||
class MushroomVeggies: public Veggies
|
||
{
|
||
public:
|
||
|
||
std::string toString() const
|
||
{
|
||
return "Mushrooms";
|
||
}
|
||
};
|
||
|
||
class GarlicVeggies: public Veggies
|
||
{
|
||
public:
|
||
|
||
std::string toString() const
|
||
{
|
||
return "Garlic";
|
||
}
|
||
};
|
||
|
||
class RedPepperVeggies: public Veggies
|
||
{
|
||
public:
|
||
|
||
std::string toString() const
|
||
{
|
||
return "Red Pepper";
|
||
}
|
||
};
|
||
|
||
class SpinachVeggies: public Veggies
|
||
{
|
||
public:
|
||
|
||
std::string toString() const
|
||
{
|
||
return "Spinach";
|
||
}
|
||
};
|
||
|
||
class OnionVeggies: public Veggies
|
||
{
|
||
public:
|
||
|
||
std::string toString() const
|
||
{
|
||
return "Onion";
|
||
}
|
||
};
|