设计模式
zhang_zhilai
这个作者很懒,什么都没留下…
展开
-
设计模式--装饰模式(C++实现)
#include<iostream>#include<string>// abstract Classclass shape{public: shape() {} virtual ~shape() {} virtual void decorateMethod() = 0;};//Concrate Classclass circle :public shape{public: circle(std::string iName):shape(),sName.原创 2021-10-24 14:39:11 · 163 阅读 · 0 评论 -
设计模式--外观模式(c++实现)
/********FacedDP Test**********/#include<iostream>//Abstract Interfaceclass shape{public: shape() = default; virtual ~shape() = default; virtual void Draw() = 0;//the Interface Method};//Concrete Classclass Circle :public shape{public.原创 2021-10-24 13:35:17 · 133 阅读 · 0 评论