We are going to create a Family Tree using everything we have learned so far in C, especially Pointers, Data Structures, and File Processing. We assume that every given person, having a name, age, and life status (alive or dead), can have two parents, zero or one partner, and up to five children. Write a C program to receive information from some persons, using the following functionalities: • Add a new person • Set a person as a parent of another person • Set a person as the partner of another person • List a person with all their relatives, including their parents, siblings, partner, and children, if any • Change the profile information of a person, including their age and life status • Remove a person from the family tree. All the related connections should be updated • List all the persons. • Save the family tree in a text file • Load a family tree from a text file Note that if we set a person as a parent of a second person, we should also set the second person as the child of the first person.
We are going to create a Family Tree using everything we have learned so far in C, especially
Pointers, Data Structures, and File Processing. We assume that every given person, having a
name, age, and life status (alive or dead), can have two parents, zero or one partner, and up to
five children. Write a C program to receive information from some persons, using the following
functionalities:
• Add a new person
• Set a person as a parent of another person
• Set a person as the partner of another person
• List a person with all their relatives, including their parents, siblings, partner, and
children, if any
• Change the profile information of a person, including their age and life status
• Remove a person from the family tree. All the related connections should be updated
• List all the persons.
• Save the family tree in a text file
• Load a family tree from a text file
Note that if we set a person as a parent of a second person, we should also set the second person
as the child of the first person.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps