/** Species models a biological species, keeping track of the number
 *  of individuals.
 */
public class Species{
  // how many are there?  What's this species called?
  private int population;
  private String name;

  /** construct a species with name n and population num.
   *  This sort of makes setPopulation() and setName()
   *  redundant.
   */
  public Species(int num, String n) {
    population= num;
    name= n;
  }

  /** getPopulation returns the number of individuals current
   *  in this Species.
   */
  public int getPopulation(){
    return population;
  }

  /** setPopulation makes this Species have population num.
   */
  public void setPopulation(int num){
    population = num;
  }

  /** setName: call this species n
   */ 
  public void setName(String n) {
    name = n;
  }

  /** getName: return this species' name
   */
  public String getName() {
    return name;
  }

  /** breed: increase this species' population by 1
   */
  public void breed() {
    population = population + 1;
  }

  /** dieOff: decrease this species' population by 1
   */
  public void dieOff() {
    population = population - 1;
  }
}


  

