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_4/Clams.hpp

39 lines
503 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 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";
}
};