Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

class Bird 1 private: string name; int speed; public: Bird (string, int); virtual void sing(); virtual void fly(); string getName() const; 1 class Birdof Prey : public Bird { protected: bool hungry: public: Birdof Prey (string, int, bool = true); virtual void kill Prey(); 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(); 1 i Assume there is an Eagle object, eagle, and a BirdOfPrey pointer is initialised as follows: Birdof Prey * hunter = {eagle; Which class" version of the function will be used in the code snippet below? hunter->fly()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

1 what does yellow colour on the map represent?

Answered: 1 week ago