title: need a search method for my tree(n-ary tree)
body: <p>i have written this tree class for a familytree</p>
  
  <p>now i need a search method to find a node in my tree</p>
  
  <p>its a n-ary tree that each node can have 0 to n children</p>
  
  <p>the search method can search for a node or for two names  includes node name and his/her father name</p>
  
  <p>plz help me</p>
  
  <pre><code>public class FamilyNode {
   public String name;
   public String sex;
   public FamilyNode Father;
   public FamilyNode Mother;
   public FamilyNode Spouse=null;
   public String status="alive";
   public int population;
   public ArrayList&lt;FamilyNode&gt; children=new ArrayList&lt;FamilyNode&gt;() ;
  
  
  public FamilyNode(String name1,String sex1){
  this.name=name1;
  this.sex=sex1;
  this.population=this.children.size()+1;
  }
  public void SetParents(FamilyNode father,FamilyNode mother){
      this.Father=father;
      this.Mother=mother;
      }
  public void SetHW(FamilyNode HW){
      this.Spouse=HW;
  }
  public void AddChild(FamilyNode child){
      child.SetParents(this.Father, this.Spouse);
      this.children.add(child);
      this.Spouse.children.add(child);
  }
  
  public int Number (){
     int number_of_descendants = this.population;
     if(this.Spouse!=null) number_of_descendants++;
  for(int index = 0; index &lt; this.children.size(); index++)
  number_of_descendants = number_of_descendants+ this.children.get(index).Number();
  return number_of_descendants;
  }
  
  }
  </code></pre>