Question: A c++ program Create a library that reads a family from a text file and store the tree in linked lists as in figure and

A c++ program

Create a library that reads a family from a text file and store the tree in linked lists as in figure and then output the tree to the screen.

You do not need to make a class intreface for this assignment. only 2 functions I need.

void displayFamilyTree(FamilyTreeNode *tree); FamilyTreeNode *readFamilyTree(const std::string &filename);

Make both files: familytree.h and familytree.cpp.

A c++ program Create a library that reads a family from a

you to re tree were changes interfac using a 13 As defined in the chapter, the the children Another poss 3. ibility is to include an extra pointer inoo s,inthe Using this representation, the form a linked list of the children. Thu that will allow them to l each node in the tree needs conta and one to its next younger to contain only two pointers: one to it in Figure 16-9. In each node, the FIGUR Normandy appears as shown ildatlnk whih hos the points down to a child; the pointer on the righionte indics len always s th sibling in the same generation. Thus, the eldest child of Willia which you obtain by following the link at the left of the remaining children are linked together through the link cells sh iagran of the node diagram. The chain of children ends at Henry 1, w ae value NULL in its next-sibling link which ide Using the linked design illustrated in this diagram, write n new definition FamilyTreeNode, readFamilyTree, and displayFami.l ree GURE 16-9 The House of Normandy using a list of siblings William I Robert William II Adela Henry Stephen William Matilda Henry II you to re tree were changes interfac using a 13 As defined in the chapter, the the children Another poss 3. ibility is to include an extra pointer inoo s,inthe Using this representation, the form a linked list of the children. Thu that will allow them to l each node in the tree needs conta and one to its next younger to contain only two pointers: one to it in Figure 16-9. In each node, the FIGUR Normandy appears as shown ildatlnk whih hos the points down to a child; the pointer on the righionte indics len always s th sibling in the same generation. Thus, the eldest child of Willia which you obtain by following the link at the left of the remaining children are linked together through the link cells sh iagran of the node diagram. The chain of children ends at Henry 1, w ae value NULL in its next-sibling link which ide Using the linked design illustrated in this diagram, write n new definition FamilyTreeNode, readFamilyTree, and displayFami.l ree GURE 16-9 The House of Normandy using a list of siblings William I Robert William II Adela Henry Stephen William Matilda Henry

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!