import java.util.Calendar; //to determine current year

/**
 * Models a Person, including their name and age.
 *
 * @author Zach Tomaszewski
 * @version 03 Mar 2008
 */
public class Person {

  private static final int CURRENT_YEAR = Calendar.getInstance().get(Calendar.YEAR);

  //instance variables: every Person has a name and YOB.
  private String name;
  private int yearOfBirth;


  /**
   * Constructs a new Person with the given name and yearOfBirth.
   */
  public Person(String n, int yob) {
    this.name = n;
    this.yearOfBirth = yob;
  }


  public String getName() {
    return this.name;
  }

  public int getYearOfBirth() {
    return this.yearOfBirth;
  }

  public int getAge() {
    return CURRENT_YEAR - this.yearOfBirth;
  }

}
