Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a new project and class FamilyTree with the following structure: Created

ID: 3541220 • Letter: C

Question

Create a new project and class FamilyTree with the following structure:

Created with a tree, a FamilyTree represents a hierarchy from children in a family (except we are only listing a single parent in each family).

For example, the family where 'Bob' has children 'Jane' and 'Tim', and 'Tim' has daughter 'Kate', can be build like so:

Given this representation, implement the methods above. Return "No parent" or "No grandparent" when none exists, or an empty list when there are no children or grandchildren.

For example, in this case, the kate node should result with the following:

Test your tree by ensuring the 4 required methods work as expected for every node in the sample family tree above, as well as on a family tree with only one person. You may have to draw the tree by hand to work out which family members these are!

You can run the setup code for your FamilyTree object automatically before each test by using the @Before decorator.

For example, to build a FamilyTree object for a test, you could add it as a member variable on the test class:

Now you can reference this.f in your test cases, and it will contain a newly constructed FamilyTree object.

Explanation / Answer

i dont understand wat u want...

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote