Marmara University CSE2260 - Principles of Programming Languages project. FTWA is a robust, object-oriented, command-line based application designed to construct and manage ancestral hierarchies.
FTWA allows users to build a family tree from scratch, manage genealogical data, and query complex kinship relationships. Unlike static databases, FTWA dynamically calculates relationships (e.g., aunt, cousin, brother-in-law) based on the current state of the tree and enforces strict biological and legal validation rules (e.g., age limits, consanguinity prohibitions).
- Dynamic Hierarchy: Dynamically calculates generational levels and kinship ties.
- Smart Validation: Prevents biologically unrealistic scenarios (e.g., child born before parent's birth, unrealistic age gaps) and prohibits invalid marriages (incest/age restrictions).
- Kinship Queries: Supports a wide range of Turkish kinship terms including Amca, Hala, DayΔ±, Teyze, Bacanak, Elti, KayΔ±nbirader, etc.
- Interactive CLI: A continuously prompting, user-friendly command-line interface.
-
In-Memory Store: Efficient
$O(1)$ data retrieval using dictionary-based indexing.
- Python 3.6 or higher.
- No external libraries required (Standard library only).
- Clone the repository:
git clone https://github.com/yourusername/FTWA.git
- Navigate to the project directory:
cd family_tree_warehouse_app
- Run the application:
python Person.py
The core architecture is built upon an object-oriented Person class.
- Global Data: Maintained via a dictionary (
family_tree) for high-performance mapping ofFull Name->Person Object. - Recursive Logic: Uses recursive algorithms to traverse lineage, accurately calculate tree levels, and resolve complex kinship chains without infinite loops.