Please read this before running the familyTree.cpp.
- We are using familyData.txt to add the basic family tree.
- User can add there queries in the userData.txt.
- In the Node, we have used heightOfNode that can be used to find therelation between two persons i.e. if height is 1 then will be siblings or cousins(but notused in the code since it was not required).
- We have added King Shan as 'King-Shan' and Queen Anga as 'Queen-Anga'. To make the parsing easywhile using ' ' as delimiter. PLEASE KEEP THIS IN MIND WHILE ADDING CHILD TO QUEEN ANGA. Rather thanadding it as ADD_CHILD Queen Anga XYZ PQR => ADD_CHILD Queen-Anga XYZ PQR
#Assumptions:
- Mother can only add the child.
- Marriage is done before having a baby(since linkage is done after marriage in the code).
- To find Paternal/Maternal relation, it is necessary to have Grand-Parent !!!
- By default we are only considering the cross-marriage culture for ease.
- We are printing the results in left to right occurence in the tree.(We can simply sort the result, to print in chronological fashion)
#Templates to Add members in familyTree:
Add Child:
ADD_CHILD A B CA:Mother-Name (that is already in the familyTree)B:Child-Name (to be added as a new Node)C:Child-Gender
Add Spouse:
MAKE_COUPLE A BA:PersonA (that is already there in the familyTree)B:PersonB (the new node to be added as spouse in the familyTree)
#Template to Query for relationship:
GET_RELATIONSHIP A BA:PersonName (already in familyTree otherwise it will show PERSON_NOT_FOUND)B:It can take below parameter for now -1. Paternal-Uncle2. Maternal-Uncle3. Paternal-Aunt4. Maternal-Aunt5. Sister-In-Law6. Brother-In-Law7. Son8. Daughter9. Siblings