---
# System prepended metadata

title: 12257 - Only children make choice!
tags: [class]

---

# 12257 - Only children make choice!
###### tags: `class`
---

## Brief
See the code below

## Solution 0

```cpp=
#include <iostream>
#include "function.h"

Animal::Animal(Zoo *zoo, string name) : belong(zoo), species(name) {
    this->belong->born(species);
}

Dog::Dog(Zoo *zoo) : Animal(zoo, "Dog") {}

Dog::~Dog() {}

Cat::Cat(Zoo *zoo) : Animal(zoo, "Cat") {}

Cat::~Cat() {}

Caog::Caog(Zoo *zoo) : Animal(zoo, "Caog"), Dog(zoo), Cat(zoo) {}

void Caog::barking() {
    std::cout << "woof!woof!meow!\n";
}

void Caog::carton() {
    std::cout << "it looks so happy!\n";
}

void Caog::throwBall() {
    std::cout << "it looks happy!\n";
}

Caog::~Caog() {}

// Utin
```

## Reference