/** A database of people. */
public class PersonDB{ 
  private Person[] people;
  
  /** Creates a default database with 3 people. */
  public PersonDB(){
    people = new Person[] {new Person("jo",25), 
                           new Person("flo",18),
                           new Person("mo", 19)};
  }
  
  /** Constructor that takes a Person array as argument**/
  public PersonDB(Person [] p){
      //Complete
      
  }
 
  /** Print Database */
 public void printDB(){
     if(people == null || people.length == 0){
         System.out.println("No entries");
         return; //to exit the method
     }
     System.out.println("Name" + "\t" + "Age");
     for(int i = 0; i < people.length; i++){
         if(people[i] != null){
             System.out.println(people[i].getName() + "\t" + people[i].getAge());
         }
     }

 }
 
  /** Calculates and returns the average age. */
  public double getAverageAge(){
    return 0; //change approriately
  }
  
  

  /** Returns true if name is in database, otherwise false 
    * Note: Recollect what we said about comparing strings  
   */
  public boolean isInDatabase(String searchName){
    //Complete this method

   return false; //change approriately
  }

 
}

