上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 75 下一页
摘要: #include <iostream>#include <string>#include <vector>#include <iomanip>using namespace std;class info{public: info():pc(0){} ~info(){} void input(string name,int age,int salary) { _name.push_back(name); _age.push_back(age); _salary.push_back(salary); pc++; ... 阅读全文
posted @ 2012-06-28 20:49 Dsp Tian 阅读(587) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string>using namespace std;class absperson;class absmed{public: absmed(){} virtual ~absmed(){} virtual void send(string,absperson*)=0; virtual void set(absperson*,absperson*)=0;};class absperson{public: absperson(){} virtual ~absperson(){} virtual vo... 阅读全文
posted @ 2012-06-28 15:00 Dsp Tian 阅读(578) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string>#define CAP 100using namespace std;class group{public: group():pc(0){} virtual ~group(){} friend class Iterator; void push(string m) { if (pc<CAP) vec[pc++]=m; } string pop() { if (!isempty()) return vec[... 阅读全文
posted @ 2012-06-28 12:39 Dsp Tian 阅读(639) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;class action{public: action(){} ~action(){} void forward(){cout<<"forward"<<endl;} void backward(){cout<<"backward"<<endl;}};class command{public: command(){} virtual ~command(){} virtual void execute()=0; virtu 阅读全文
posted @ 2012-06-27 14:03 Dsp Tian 阅读(582) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <vector>using namespace std;class relatives{public: relatives(){} virtual ~relatives(){} virtual bool request(int)=0;};class brother : public relatives{public: brother(){} virtual ~brother(){} bool request(int num) { if (num<100) { ... 阅读全文
posted @ 2012-06-27 12:50 Dsp Tian 阅读(635) 评论(0) 推荐(0) 编辑
摘要: #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... 阅读全文
posted @ 2012-06-26 21:03 Dsp Tian 阅读(547) 评论(0) 推荐(0) 编辑
摘要: #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(){} 阅读全文
posted @ 2012-06-26 16:04 Dsp Tian 阅读(446) 评论(0) 推荐(0) 编辑
摘要: #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 阅读全文
posted @ 2012-06-26 15:28 Dsp Tian 阅读(485) 评论(0) 推荐(0) 编辑
摘要: #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 阅读全文
posted @ 2012-06-26 13:44 Dsp Tian 阅读(1866) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;class software{public: software(){} virtual ~software(){} virtual void exec()=0;};class game : public software{public: game(){} virtual ~game(){} void exec(){cout<<"play game"<<endl;}};class office : public software{public: office(){ 阅读全文
posted @ 2012-06-25 14:07 Dsp Tian 阅读(778) 评论(0) 推荐(1) 编辑
上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 75 下一页