>Write a program in which you create a Hen class. Inside this class, nest a Nest class. Inside Nest, place an Egg class. Each class should have a display() member function. For each class, create a constructor and a destructor that prints an appropriate message when it is called. In main(), create an instance of each class using new and call the display() function for each one. After calling display(), free the storage using delete.
And i came up with this code can anyone help me if im missing something its realy comfusing question. and also the last line about Delete function im confusing about as well plzz help.

#include<iostream>
#include <string>
using namespace std;

// Create an abstract data type that represents a hen.
class Hen
{
string name;
public:
Hen (void);
~Hen (void);
class Nest{
int size;
public:
class Egg{
int age;
public:
void display();
};
void display();
};
void display();
};

//display the age of the egg.
void Hen::Nest::Egg::display()
{
cout<<"Egg display called... "<<endl<<"Egg's age is : "<<age<<endl;
}
// display the size of the nest.
void Hen::Nest::display()
{
cout<<"Nest display called... "<<endl<<"Size of nest is : "<<size<<endl;
}
// display the name of the hen
void Hen::display()
{
cout<<"Hen display called... "<<endl<<"Hen's name is: "<<name<<endl;
}

Hen::Hen()
{
cout << "A new hen has appeared!" << endl;
}

Hen::~Hen()
{
cout << "The hen died " << endl;
}


int main()
{
Hen h;
Hen::Nest n;
Hen::Nest::Egg e;
h.display();
n.display();
e.display();

}