Genealogy (Family Tree) is the study of families and the tracing of their lineages and history.

Genealogists use oral traditions, historical records, genetic analysis, and other records to obtain information about a family and to demonstrate kinship and pedigrees of its members.

Implement a C++ Genealogy application that collects, stores, and displays genealogical data. The data should be stored in a family tree and should include information of individuals such as births, marriages, and deaths, occupation, addresses, notes, etc. In addition, the program should use appropriate data structures and algorithms to link related family members.

The application is to:

• Begin with minimal knowledge about the family.
• Able to add genealogical data of individual in a family tree.
• Able to search genealogical data of individual in a family tree.
• Able to display the children of individual selected by user
• Able to display complete family tree.

A text driven user interface is adequate for the application, however, it must be user friendly.

Note 1: You are NOT to make use of the Standard Template Libraries (STL) from the C++ standard library for the implementation of your data structures and operations.

The application must:
• Make use of a tree structure
• Demonstrate the application of algorithms learnt (e.g. searching)
• Graphical User Interface
• Able to store family tree in an external file and load family tree
• Able to display the family tree in hierarchical form
• Able to remove genealogical data of individual in a family tree, including all the individual’s descendants
• Comprehensiveness of Query reports (e.g. display the parents, direct kin, ancestors, descendants, etc.)
• User validation
• Algorithm optimization
• Robustness

The data structures and algorithms chosen should be appropriate for your application.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

#include "FamilyTree.h"

FamilyTree::FamilyTree() {
   root = 0;

FamilyTree::~FamilyTree() {

List * FamilyTree::matchedIndividual(string name)
    List * list = new List();
    recursiveFinding(name, list, root);
    return list;

void FamilyTree::recursiveFinding(string name, List * list, Node * n)
    if (n != 0)
       // add the current individual to the list
       // if the name is matched
       if (n->getIndividual()->getName() == name)
       // add the children of the current individual to the list
       // recursive call
       Node * curr = n->getFirstChild();
       while (curr != 0)
            recursiveFinding(name, list, curr);
            curr = curr->getNextSibling();

void FamilyTree::setRoot(Node * n)
    if (n != 0)
       root = n;

By purchasing this solution you'll be able to access the following files:

50% discount

$50.00 $25.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available C-Family Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats