Question: Class Bird private: string name; int speed; public: Bird (string, int); virtual void sing(); virtual void fly(); string getName() const; }; class Birdof Prey :

 Class Bird private: string name; int speed; public: Bird (string, int);

Class Bird private: string name; int speed; public: Bird (string, int); virtual void sing(); virtual void fly(); string getName() const; }; class Birdof Prey : public Bird { protected: bool hungry: public: Birdof Prey (string, int, bool = true); virtual void killPrey(); bool isHungry(); }; class Eagle : public Birdof Prey { public: Eagle(string, int, bool false); void kill Prey(); void sing(); }; class Hen : protected Bird { public: Hen (string); virtual void sing(); void layEggs(); }; Assume there is an Eagle object, eagle, and a BirdOfPrey pointer is initialised as follows: Birdof Prey * hunter = teagle; Which class' version of the function will be used in the code snippet below? hunter->killprey()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!