can someone help me figure out how i would relate composition and aggregation to a Person class that is composed of another class that is composed of another class and also includes itself in it. It also has a deep copy, a destructor, and all appropriate accessors and mutators in it as well.
#include "Date.h"
#include <cstring>
class Person
{
public:
Person(string name, int year, int month, int day);
Person(Person&) ;
Person::sister;-----------***this is susposed to be of type person but i don't know how to incorporate that...can someone show me how???*****
Person::~Person ()
string getName();
Date* getBirthDate();
private:
string name;
Person sister;
Date* birthDate;
};
#include "Date.h"
#include <cstring>
class Person
{
public:
Person(string name, int year, int month, int day);
Person(Person&) ;
Person::sister;-----------***this is susposed to be of type person but i don't know how to incorporate that...can someone show me how???*****
Person::~Person ()
string getName();
Date* getBirthDate();
private:
string name;
Person sister;
Date* birthDate;
};
Comment