public void removeChild(Person barn) { if (this.isMale()) { barn.setFather(null); } else if (this.isFemale()) { barn.setMother(null); } }
public void addChild(Person barn) { if (!this.children.contains(barn)) { if (this.isMale()) { barn.setFather(this); } else if (this.isFemale()) { barn.setMother(this); } } }