#includeusing namespace std;class buildcomputer{public: buildcomputer(){} virtual ~buildcomputer(){} virtual void buildmouse()=0; virtual void buildmointor()=0; virtual void buildkeyboard()=0; virtual void buildhost()=0;};class winbuildcomputer : public buildcomputer{public: winbuildcomputer(){} virtual ~winbuildcomputer(){} void buildmouse(){cout<<"build win mouse"< buildmouse(); instance->buildmointor(); instance->buildkeyboard(); instance->buildhost(); }};int main(){ buildcomputer *p=new macbuildcomputer; director *dc=new director(p); dc->creator(); delete dc; delete p; p=new winbuildcomputer; dc=new director(p); dc->creator(); delete dc; delete p; system("pause"); return 0;}