#include using namespace std; typedef int HANDS; enum COLOR{red,green,blue,yellow,white,black,brown}; enum BOOL {FLASE,TRUE}; class animal { int itsage; public: animal(){} animal(int); virtual ~animal(){ cout<<"animal destructor...\n";} virtual int getage() const { return itsage;} virtual void setage(int age){ itsage=age;} }; animal::animal(int age) { itsage=age; cout<<"animal constructor...\n"; } class horse:public animal { public: horse(); horse(COLOR color,HANDS height,int age); virtual ~horse(){cout<<"horse destructor...\n";} virtual void whinny() const { cout<<"whinny!....";} virtual HANDS getheight() const { return itsheight;} virtual COLOR getcolor() const { return itscolor;} protected: HANDS itsheight; COLOR itscolor; }; horse::horse(COLOR color, HANDS height,int age) { animal(age); itscolor=color; itsheight=height; cout<<"horse constructor...\n"; } class bird:public animal { public: bird(); bird(COLOR color,BOOL migrates,int age); virtual ~bird(){ cout<<"bird destructor...\n";} virtual void chip() const { cout<<"chip...";} virtual void fly() const{ cout<<"i can fly!";} virtual COLOR getcolor() const{ return itscolor;} virtual BOOL getmigration() const { return itsmigration;} protected: COLOR itscolor; BOOL itsmigration; }; bird::bird(COLOR color,BOOL migrates,int age) { animal(age); itscolor=color; itsmigration=migrates; cout<<"bird constructor...\n"; } class pegasus:public horse,public bird { public: void chirp() const{ whinny();} pegasus(COLOR,HANDS,BOOL,long,int); ~pegasus(){ cout<<"pegasus destructor...=n";} virtual long getnumberbelievers() const { return itsnumberbelievers;} virtual COLOR getcolor() const { return horse::itscolor;} virtual int getage() const { return horse::getage();} private: long itsnumberbelievers; }; pegasus::pegasus(COLOR acolor,HANDS height,BOOL migrates,long numbelieve,int age) { horse(acolor,height,age); bird(acolor,migrates,age); itsnumberbelievers=numbelieve; cout<<"pegasus constructor...\n"; } int main() { pegasus *preg=new pegasus(red,5,TRUE,10,2); int age=preg->getage(); cout<<"this pegasus is"<