Check out the answers

#include 
#include 
using namespace std;

enum Gender {MALE, FEMALE};
enum Color  {WHITE, RED};

class Smurf {
public:
  Smurf();

  void Sing();
  string GetHeight();

private:
   string height;

protected:
   string songWords;

};


class GenderedSmurf : public Smurf {
public:
  GenderedSmurf(Gender gender);

  bool IsMaleSmurf();

protected:
  Gender gender;
};


class AgedSmurf : public GenderedSmurf {
public:
  AgedSmurf(Color pants, Gender gender);

  bool IsPapaSmurf();
  void Sing();

private:
  Color pants;
};

/////////////////////////////////////////////////////////////////

Smurf::Smurf() {
  songWords = "La la, la-la la la, la la-la la la";
  height    = "Three apples tall";
}

void Smurf::Sing() {
  cout << songWords << endl;
}

string Smurf::GetHeight() {
  return height;
}


GenderedSmurf::GenderedSmurf(Gender gender) {
  this->gender = gender;
}

bool GenderedSmurf::IsMaleSmurf() {
  return (gender == MALE);
}


AgedSmurf::AgedSmurf(Color pants, Gender gender)
                         : GenderedSmurf(gender) {
  this->pants = pants;
}

bool AgedSmurf::IsPapaSmurf() {
  if (pants == RED && gender == MALE)
    return true;

  return false;
}

void AgedSmurf::Sing() {
  cout << "Dum diddiley I-O" << endl;
}

/////////////////////////////////////////////////////////////////

/*


Questions:

  1) What do the following do?  Give the ouput or return value.
     If it is illegal, say so and explain why.

*/

int main() {

     Smurf harmony;				// line 1
 
     GenderedSmurf smurfette(FEMALE);		// line 2

     AgedSmurf papa(RED, MALE);			// line 3

     harmony.Sing();				// line 4

     cout << harmony.GetHeight() << endl;	// line 5

     smurfette.IsMaleSmurf();			// line 6
     
     smurfette.Sing();				// line 7

     papa.IsPapaSmurf();			// line 8

     smurfette.IsPapaSmurf();			// line 9

     papa.gender = FEMALE;			// line 10

     smurfette.pants = WHITE;			// line 11

     papa.Sing();				// line 12

     harmony.height = "Two apples tall";	// line 13
     
     return 0;					// line 14
}


/*
  2) Which class would you modify if you wanted
  all Smurfs to be able to change the Song 
  they can sing?




  3) Which class would you modify if you wanted
  Smurfette to be the only smurf which can
  change its song?




  4) How would you change AgedSmurf::IsPapaSmurf()
  if gender was private instead of protected?

*/


Check out the answers