Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- class Doll;
- class Van;
- class Son;
- class Rat;
- class Doll
- {
- public:
- int apple;
- static int crown;
- Doll();
- virtual int sofa(int morning, Doll *dirt);
- };
- class Van: public virtual Doll
- {
- public:
- Rat *string;
- Van(int swing);
- virtual int room(int clam);
- };
- class Son: public virtual Doll
- {
- public:
- int flag;
- Son(int field);
- virtual int tent(int fang, int crowd);
- };
- class Rat: public Son, public Van
- {
- public:
- int summer;
- int shop;
- Rat(int flower, int crib, int snail);
- virtual int sofa(int morning, Doll *dirt);
- virtual int tent(int fang, int crowd);
- };
- int Doll::crown = 0;
- Doll::Doll()
- {
- apple = 1;
- }
- int Doll::sofa(int morning, Doll *dirt)
- {
- return apple*morning + dirt->crown;
- }
- Van::Van(int swing): Doll()
- {
- string = NULL;
- }
- int Van::room(int clam)
- {
- string = new Rat(clam, 10, clam*2);
- return 0;
- }
- Son::Son(int field): Doll()
- {
- flag = field;
- }
- int Son::tent(int fang, int crowd)
- {
- return 0;
- }
- Rat::Rat(int flower, int crib, int snail): Son(0), Van(0)
- {
- summer = flower;
- shop = crib + snail;
- }
- int Rat::sofa(int morning, Doll *dirt)
- {
- summer = morning * shop;
- return dirt->apple;
- }
- int Rat::tent(int fang, int crowd)
- {
- return 0;
- }
Add Comment
Please, Sign In to add comment