QtDesignPatterns/builderpattern/packinterface.h

29 lines
339 B
C
Raw Permalink Normal View History

2024-02-06 17:21:37 +08:00
#include <iostream>
using namespace std;
class Packing
{
public:
Packing(){}
virtual ~Packing(){}
virtual string pack() = 0;
};
class Wrapper: public Packing
{
public:
string pack()
{
return "Wrapper";
}
};
class Bottle: public Packing
{
public:
string pack()
{
return "Bottle";
}
};