39 lines
503 B
C++
39 lines
503 B
C++
/*
|
||
* Clams.hpp
|
||
*
|
||
* Created on: 3 нояб. 2021 г.
|
||
* Author: alexander
|
||
*/
|
||
|
||
#pragma once
|
||
|
||
#include <string>
|
||
|
||
class Clams
|
||
{
|
||
public:
|
||
virtual std::string toString() const = 0;
|
||
|
||
virtual ~Clams() {}
|
||
};
|
||
|
||
class FreshClams: public Clams
|
||
{
|
||
public:
|
||
|
||
std::string toString() const
|
||
{
|
||
return "Fresh Clams from Long Island Sound";
|
||
}
|
||
};
|
||
|
||
class FrozenClams: public Clams
|
||
{
|
||
public:
|
||
|
||
std::string toString() const
|
||
{
|
||
return "Frozen Clams from Chesapeake Bay";
|
||
}
|
||
};
|