Includewww
Includewww
h>
#include <iostream>
#include <vector>
class Person;
class Person
protected:
string name;
int age;
string sex;
public:
Person* father;
Person* mother;
Person* spouse;
void displayAll () ;
void displayChildren(Person* p) ;
void displayCousins();
void displayAncestors();
void displayDescendants();
vector<Person*> children;
vector<Person*> siblings;
this->children = children;
this->father = father;
this->spouse = spouse;
this->siblings = siblings;
return name;
return age;
return sex;
Person* getFather(){
return father;
Person* getMother(){
return mother;
Person* getSpouse(){
return spouse;
this->spouse = spouse;
spouse->spouse = this;
return c;
this->children.push_back(c);
this->spouse->children.push_back(c);
this->siblings.push_back(c);
c->siblings.push_back(this);
vector<Person*> getSiblings(){
return siblings;
vector<Person*> getChildren(){
return children;
};