Suppose you have a class CBird

profileThehonest
 (Not rated)
 (Not rated)
Chat

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


 

 

 

    • 10 years ago
    A+ Work
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      8bkibep2.zip