摘要:
#include <iostream>using namespace std;class surfinternet{public: surfinternet(){} virtual ~surfinternet(){} virtual void look_youtube()=0; virtual void look_twitter()=0; virtual void look_fackbook()=0;};class overwall : public surfinternet{public: overwall(){} virtual ~overwall... 阅读全文
摘要:
#include <iostream>using namespace std;class subsys1{public: subsys1(){} ~subsys1(){} void operation(){cout<<"subsys1"<<endl;}};class subsys2{public: subsys2(){} ~subsys2(){} void operation(){cout<<"subsys2"<<endl;}};class subsys3{public: subsys3(){} 阅读全文
摘要:
#include <iostream>#include <string>using namespace std;class text{public: text(){} virtual ~text(){} virtual void operation(){cout<<"a text"<<endl;}};class Scoll :public text{public: Scoll(){} virtual ~Scoll(){} void decorator(text* comp){this->tx=comp;} void op 阅读全文
摘要:
#include <iostream>#include <string>#include <vector>using namespace std;class Composite{public: Composite():_name(""){} Composite(string name):_name(name){} virtual ~Composite(){} virtual void operation()=0; virtual void add(Composite*){} virtual void del(Composite*){} v 阅读全文