Answered You can hire a professional tutor to get the answer.

QUESTION

1. Construct a family tree organized as follows: The root node holds a parents's name (names must be unique) as a key; each name is unique. Then,

 Construct a family tree organized as follows: The root node holds a parents's name (names must be unique) as a key; each name is unique. Then, after reading pairs of names from a file of your choice, output the relations between pairs or persons. I/O description. Input. (< parentN ame > (< childN ame > < childN ame > ... < childN ame >)) ... ?< name1 >, < name2 > The angle brackets ('') do not exist in the input, they just mark changeable amounts. All names (i.e. < childN ame >, < parentN ame >, < name1 >, < name2 > are alphabetic strings with no spaces. '(', ')' are delimiters. '?' signals query about persons. Output is relation degree (i.e, child, parent, cousin, etc.).

1. Construct a family tree organized as follows:The root node holds a parents's name (names must be unique) as a key; each name is unique.Then, after reading pairs of names from a file of your choice, output the relations betweenpairs or persons.1/O description. Input.(&lt; parentN ame &gt; (&lt; childN ame &gt; &lt; childN ame &gt; ... &lt; childN ame &gt;)) ... ?&lt; namel &gt;, &lt;name2 &gt; The angle brackets (&quot;') do not exist in the input, they just mark changeable amounts.All names (i.e. &lt; childN ame &gt;, &lt; parentN ame &gt;, &lt; namel &gt;, &lt; name2 &gt; are alphabeticstrings with no spaces. '(', ')' are delimiters. '?' signals query about persons.Output is relation degree (i.e, child, parent, cousin, etc.).Example:MatildeSebastianLeonorPhilipMaryRaulAmeliaFrederickEthelLionelAgnesJoaquimJuliaAlvaroAugustaWrite the code for representing binary trees as lists of children. Input is as the binary treeyou constructed Output is prefix, postfix, and infix traversals of the tree on three separatelines.
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question