// An interface for a population.
// Barry Cornelius, 19 June 2000
import java.util. Observer;
public interface Pop
{
   // returns true if and only if pPerson is not already in the population
   public boolean add(Person pPerson);

   // returns true if and only if a person with the name pName is
   // in the population
   public boolean remove(String pName);

   // returns null if and only if there is not a person with the name pName
   public Person get(String pName);

   // returns null if and only if there is no first person
   public Person getFirst();

   // returns null if and only if there is no next person
   public Person next();

   // returns the size of the target population
   public int size();

   // return the value true if and only if the target population
   // represents the same population as pObject
   public boolean equals(Object pObject);

   // returns a hashcode for the target population
   public int hashCode();

   // returns a textual representation of the target population
   public String toString();

   // registers pObserver as an observer of the target population
   public void addObserver(Observer pObserver);
}
