Question: C++ Part 2 Inheritance 2-1 Define and implement a class named hunter. A hunter object represents an anlmal that hunts for its food in the
C++

Part 2 Inheritance 2-1 Define and implement a class named hunter. A hunter object represents an anlmal that hunts for its food in the wild The hunter class must be defined by inheriting from the animal class and it has the following constructor and private attribute: hunter(string n, int v); create a hunter with nane n and body volune v Int kills 1 how nany kills have been recorded, Initialised to 0 The class must also have a private static attribute: static int nextID which is the unique animalID of the next hunter object to be created. This h incremented by 1 each time a new hunter object is created. This must be initialized to the value of 1000 in the hunter.cpp file, the animallD of the first hunter is 1000. You need get and set functions to access the private attribute, kilts, but there must not be a get or set tunction for the private static attribute nextiD. You need to define the get name function for this class which returns the nameof the hunter object, prefxed with the string "Hunter: " 2-2 Define and implement a class named vegie. A vegle object represents an anmal that only eats vegetables The vegleclass must be defined by inheriting from the anlmal class and it has the following constructor and private attribute: vegie(string n, nt ); // create a vegie with nane n and hody volure v string favourite foodthe vegie's favourite food, initialise to "grass* The class must also have a private static attribute static int nextID which is the unique animallD of the next vegie object to be created. This is incremented by 1 each time a new vegle object is created. This must be initialized to the value of 100 in the vegle.cpp file, the animallD of the first vegle is 100. You need get and set functions to access the private attribute, favourite food but there must not be a get or setfunction for the private static attribute nextiD. You need to define the get name function for this class which returns the nome of the vegle object, prefixed with the string "Safe:" aver't started Frefox in a while. Do you want to clean it
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
