Question: In c++ please and a correct answer please because last time some guy gave me a wrong code. Thanks Part 1 - Simple Classes and

In c++ please and a correct answer please because last time some guy gave me a wrong code. Thanks
Part 1 - Simple Classes and Class Variables 1-1 Define and implement a class named animal that has the following public constructors and behaviours animal (string aSpecies); // animals are allocated a unique ID on creation, // the first animal has ID 1, the second animal is 2 and so on void set_name(string aName); // change the animal's name string get_speciesO; string get nameO; int get_IDO; // the animal's unique ID This should be straight forward except for the ID. How do we keep track of what ID number we are up to? The solution to this problem is to declare a class variable as we saw in the Panda example. A class variable as its name implies is a variable that belongs to the class itself, not object instances. It is declared in the class declaration (just like other state variable) but is identified as a class variable by the keyword static. There is only one copy of this variable no matter how many object instances are created Class variables are declared in the classname>,h file but they cannot be initialised in a constructor and must be initialised in the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
