Simple drawing.
Given a class diagram and the code for the data definitions, that represent the descendant tree, develop the following methods:
find
, which produces the Person
object for a person
with the given name, or null
, if no person in the tree
has this name.
children
, which produces a list of
children for a person
with the given name, or an empty list of
children, if a Person
with this name is not in the tree.
count
, which counts how many people are listed in
the descendant tree