return new Parents(this.parent.getFather(), this.parent.getMother()); -->
class parent should implement interface Cloneable, and create method clone. Method getParents should return a clone.
serialization
shapes extended from group bad idea when you use inheritance it must be logical for example: dog extends animal or circle extends shape ...
methods encodeGroup have 4 nested loops should make helper methods for all shapes
builder
immutable
serialization