#include <iostream>
using namespace std;
class Animal //讲解员
{
public:
Animal(){}
virtual void perform(){cout << "=====" << endl;}
};
class Lion:public Animal //狮子
{
public:
Lion(){}
void perform(){Animal::perform();cout << "动物:狮子" <<" 表演:跳火圈" << endl;}
};
class Elephant:public Animal //大象
{
public:
Elephant(){}
void perform(){Animal::perform();cout << "动物:大象" <<" 表演:吹泡泡" << endl;}
};
class Monkey:public Animal //猴子
{
public:
Monkey(){}
void perform(){Animal::perform();cout << "动物:猴子" <<" 表演:踩高跷" << endl;}
};
void fun(Animal &p) //行为
{
p.perform();
}
int main()
{
Lion l1;
Elephant e1;
Monkey m1;
fun(l1);
fun(e1);
fun(m1);
return 0;
}