Question: c++ repl.it only In this project we will be making an extended version of Old Mcdonald Had a Farm. You will make one parent class
c++
repl.it only
In this project we will be making an extended version of "Old Mcdonald Had a Farm".
You will make one parent class that is named "Animal".
The parent class will have a functions that will be able to "get" the animal color, size, name, sound, and newtons (newtons is calculated by multiplying the weight (in kilograms) by 9.8 m/s^2.
You will have multiple child classes that will inherit from the parent class. All child classes should have protected variables of "animalColor", "size", "weightInKiloGrams", "animalName", and "sound".
The size specifically should be small, medium, or large
When the user runs the program, the program should ask the user to input parameters to one instance of each animal (The only one you will not need to ask the user for is sound, which you should hard code the class definition of the animal). You should create a single instance of each subclass before you ask the user. (Create an instance of cow, pig, chicks, duck, horse, lamb, etc).
Full song can be found here: https://www.kidsongs.com/lyrics/old-macdonald-had-a-farm.html
After the user inputs parameters for all instances, you will print out the song in the following manner....repeated for all the other animals in the traditional song. You must use getters (accessors) and can not reference the variables directly.
Old MacDonald had a farm Ee i ee i o And on his farm he had a cow
The cow's name was (getName())
The cow was (getSize())
The cow's color was (getColor())
The cow's force was (getNewtons())
Ee i ee i oh With a (getSound()) (getSound()) here And a (getSound()) (getSound())there Here a (getSound()), there a (getSound()) Everywhere a (getSound()) (getSound())
......
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
