Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I already post this one last time, however you guys just gave me the code but didnt give me the output. For this assignment, using

I already post this one last time, however you guys just gave me the code but didnt give me the output. For this assignment, using C++ and I need the output of the screenshot. After you run the code take a screenshot of the actual output and send me. And copy of the code. Thank you. image text in transcribed
image text in transcribed
Write a complete program, using the node representation of binary trees (the nodes can be implemented using either an array or dynamic storage, your choice to do the following.. The program will read in a set of data representing a family tree. It will mplement this as a binary Here is an outline of what the program will do: First, It will do whatever initializations (if any) are necessary. Then it will read in a set of data representing a family tree. The format of the data is described tree in Pascal, then it will answer a series of questions about the family tree. below. You should print the original data as it ls read In. By hand, you should drew the original family tree in it's usual form. The program will convert the data into a binary tree (this can be done as you are reading the data in). By hand you should draw the binary tree representing the original tree. Next the program will answer a series of questions about the tree. Possible questions are: Given a person p in the tree... 1) Who is the father of p? 2) Who are all the sons of p? 3) Who are all the brothers of p? 4) Who is the oldest brother of p? 5) Who is the youngest brother of p? 6) Who is the oldest son of p? 7) Who is the youngest son of p? 8) Who are the uncles of p? 9) Who is the grandfather of p? Note: P can be any node in the tree, including the root or a leaf. the first thing to do is locate p in tree (you might want to store some information along the way down to p). You should determine what the question is, then answer each question in a separate subprogram. (Of course, that subprogram may all other subprograms as well. Some of these may be shared.) Note that the same question can be asked node p. After you have answered a series of questions about this tree, you should start the process all over again for a different family tree. Start the output from each tree on a new for at least 5 family trees, including those given in class. several times for a given tree, each time for a different page. Continue this ram should be written in a modular style. Be sure that each subprogram has a very Your prog good comment explaining what it does. Be sure to specify any global variables that you might use

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

Step: 3

blur-text-image

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

=+Do you think these assumptions are reasonable?

Answered: 1 week ago