#include <iostream>
class Animal {
public:
void action() {
std::cout << "The animal does something.
";
}
};
class Fish: public Animal {
public:
void action() {
std::cout << "Fish swim.
";
}
};
class Bird: public Animal {
public:
void action() {
std::cout << "Birds fly.
";
}
};
int main() {
Animal newAnimal;
Fish newFish;
Bird newBird;
newAnimal.action();
newFish.action();
newBird.action();
return 0;
}