This is a console application that processes parent-child and spouse relationships between individuals and answers additional queries that can be derived from those relationships.
The application takes a text file as input which specifies the relationships and queries and after processing the relationships outputs the results / answers to the console.
Sample input file location ./SampleInput
Functions supported in the input file
-
ADD_SPOUSE
<husband's name>
<wife's name>
-
ADD_CHILD
<mother's name>
<child's name>
<child's gender>
-
GET_RELATIONSHIP
<person's name>
<relationship to find>
Supported gender values Male | Female
Supported relationship values Paternal-Uncle | Maternal-Uncle | Paternal-Aunt | Maternal-Aunt | Brother-in-Law | Sister-in-Law | Siblings | Son | Daughter
Directions to run
- Install dotnet core v3.1 or later (if not already present)
- cd to the root folder for the application (containing the FamilyTree.sln file)
- Run
dotnet build -o dist
- Run using an input file
dotnet dist/FamilyTree.dll ".\SampleInput\input1.txt"
Directions to test
- Install dotnet core v3.1 or later (if not already present)
- cd to the root folder for the application (containing the FamilyTree.sln file)
- Run
dotnet test