Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

3. Discuss the process of behavior modeling training.

Answered: 1 week ago