Question: Java8 programming,ArrayList,List,recursion,tree, please explain in detail You will need to create two classes, Family Tree and FamilyMember. The objective of the Family- Member class is

Java8 programming,ArrayList,List,recursion,tree, please explain in detail

Java8 programming,ArrayList,List,recursion,tree, please explain in detail You will need to create two

classes, Family Tree and FamilyMember. The objective of the Family- Member class

is to represent a person within a family tree. Use the following

scaffold as part of your solution. import java.util.List; import java.util.ArrayList; public class

You will need to create two classes, Family Tree and FamilyMember. The objective of the Family- Member class is to represent a person within a family tree. Use the following scaffold as part of your solution. import java.util.List; import java.util.ArrayList; public class FamilyMember { private String name; private int age; private List children; //Rest of your code here import java.util.List; public class FamilyTree { private FamilyMember headofFamily; public FamilyTree (FamilyMember headOfFamily) { this.headofFamily = headofFamily; public List getAll() { //Your code here public List getParents() { //Your code here public List get Childless () { ///Your code here public List getUnclesAndAunties () { //Your code here public static void main(String[] args) { //Test your code here Consider the following family tree: Jeremy Meredith Sarah Kelly James Fred David Fiona After implementing the FamilyTree and FamilyMember classes, implement the following queries Write a method public List getAll() which will retrieve all fam- ily members that are part of the family tree. Write a method public List getAllParents () which will re- trieve all family members that have children, after writing getAllParents, write the inverse that will find all Family Member's that do not have a child. Difficult: Write a method public List get UnclesAndAunties (). which will find all uncles and aunties

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!