[Solved]-Using C 11 Zoo Tycoon Goals Develop Multiple Classes Program Requirements Implement Inheri Q37231617
Using C++ 11
Zoo Tycoon
Goals
- Develop multiple classes from program requirements
- Implement inheritance
For this project, we will write a zoo tycoon game using classesand inheritance. Zoo tycoon is a game that allows players to run azoo business. Different types of animals cost different prices,have different maintenance costs, and of course, return a differentprofit at the end of each day. For this game, the playerwill be the proud owner of a virtual zoo that has spaces to housetigers, penguins and turtles.
Requirements
Animal Class
The Animal class has the following member variables:
- Age
- Adult if age >= 3 days
- Baby if age < 3 days
- Cost
- Tiger cost $10,000
- Penguin cost $1,000
- Turtle cost $100
- Number of Babies
- Tigers have 1 baby
- Penguins have 5 babies
- Turtles have 10 babies
- Base Food Cost
- You can get this base food cost from the user or set it as aconstant. Example base food cost per animal per day: $10.
- Tigers have a feeding cost of 5 times the base cost
- Penguins have a feeding cost that is the same as the basecost
- Turtles have a feeding cost that is 50% the base cost
- Payoff
- A tiger’s payoff per day is 20% of their cost per animal. (notcounting bonus)
- A penguin’s payoff per day is 10% of their cost per animal
- A turtle’s payoff per day is 5% of their cost per animal
Note: please do not modify the variables namesor add more member variables to this class.
Game Flow:
The player begins with a specific amount of money in thebank, e.g. 100,000 dollars. At the start, the user needsto buy three types of animals (tigers, penguins, turtles) to startthe business. Each type should have a quantity of either 1or 2. For each animal bought, the cost is subtracted fromthe bank. All newly bought animals are 1day old.
Each turn is a “day”. At the beginning of theday, all animals increase age by 1 day, and the user needs to paythe feeding cost of each animal. Feeding is required so the animalsdon’t die. After the feeding cost is subtracted from the bank, onerandomized event takes place during the day. You can determine howto implement the random functions by yourself. The random functionwill pick one random event from the following list:
Random Events:
- A sickness occurs to an animal in the zoo:
- Pick an animal at random that will die
- Remove one animal of that type from the exhibit. (dynamic arrayin the zoo)
- A boom in zoo attendance occurs:
- Generate a random bonus between 250 and 500 dollars for eachtiger in the zoo for the day
- Add the bonus payoff for each tiger to the total payoff of theday as a reward
- A baby animal is born:
- Pick an animal at random to have a baby
- Check if there is an animal old enough to be a parent (age>= 3), add babies to the zoo depending on the “number of babies”specific to the type of animal. If no animal is old enough of therandomly selected type, pick another type of animal. Baby animalsstart at age 0. For simplicity, you don’t need to consider thegender of the adult animals in order to have babies. One adultanimal is good enough to have babies.
Note: If no animals are able to give birth tobaby animals in the zoo, your program needs to be able to recognizethis and recover.
4. Nothing happens
After the random event, calculate the profit for the day basedon the number of each animals and their payoff. If there is a bonusfor the day, add it to the profit as well. Before the day ends, askthe player if they would like to buy anadultanimal. If they do, ask for the type ofanimal they would like, then add the animal to the zoo and subtractthat cost from the bank. The adult animal that is bought will be 3days old.
After the end of a day, prompt user whether to keep playing orend the game. If the user has no money, print a message to tell theuser the game is over, and end the game.
Class requirements
The following classes are required: zoo, animal, tiger,penguin, and turtle. The program also must useinheritance; the tiger, penguin, and turtle class mustinherit from animal class.
Also, the zoo class should have a dynamic arrayfor each type of animal. Each dynamic array should have acapacity of 10 animals to start with. If more animals areadded, you should resize the dynamic arrayby doubling the starting capacity to hold moreanimals.
Make sure to check for incorrect data types entered by the userand continue to re-prompt for input until valid input isreceived.
- Create the Animal class and object
- Create the Penguin, Turtle, and Tiger class objects
- Implement the game:
- Implement the program to manage the feed cost and payoff at theend of each day
- Implement the random events
- Implement the game loop for each “day”
- Resize the dynamic array correctly when the number of itemsexceeds the list capacity
- Implement input validation functions
Expert Answer
Answer to Using C++ 11 Zoo Tycoon Goals Develop multiple classes from program requirements Implement inheritance For this project,… . . .
OR

