public class PersonDB{
  //Has a Person array that can hold other Person subtypes
  private Person[] people;
  public PersonDB(Person [] p){
       people = p;
  }
  
  public int count(char t) {
     //Complete
     int count = 0;
     for(int i = 0; i < people.length; i++){
       //instanceof operator distinguishes between subtypes
       if(t == 's' && people[i] instanceof Student){
         count++;
       }
       if(t == 'f' && people[i] instanceof Faculty){
         count++;
       }
     }
     return count;
  }
}

