Is the following code:
class FamilyMember{
String name;
String type;
}
class Family{
FamilyMember father;
FamilyMemeber mother;
List<FamilyMember> children;
}
will produces the following relationship:
+------------------+ +------------------+
| Father |------| Mother |
+------------------+ ^ +------------------+
|
|
|
|
|
--------------
| |
| |
| |
| |
+------------------+ +------------------+
| Son | | Daughter |
+------------------+ +------------------+
Since the Number of children are different in different family, therefore every family have its own family structure.
I want to make the class which can shows the above relationship with variable number of children.