Is it reasonable to create a chawk by deriving from cbird


Suppose you have a class CBird

Suppose you have a class CBird, as follows, that you want to use as a base class for deriving a

hierarchy of bird classes:

class CBird

{

protected:

int wingSpan;

int eggSize;

int airSpeed;

int altitude;

public:

virtual void fl y() { altitude = 100; }

};

Is it reasonable to create a CHawk by deriving from CBird ? How about a COstrich ? Justify your answers. Derive an avian hierarchy that can cope with both of these birds

Solution Preview :

Prepared by a verified Expert
Programming Languages: Is it reasonable to create a chawk by deriving from cbird
Reference No:- TGS01723863

Now Priced at $35 (50% Discount)

Recommended (91%)

Rated (4.3/5)