/**
 * A student attending university.
 */ 
public class Student {
  
  /**
   * The first name of the student. 
   * This is an "instance variable".
   */
  private String firstName;
  
  /** The last name of the student. */
  private String lastName;
  
  /** The total number of students. */
  private static int totalStudents;
  
  /**
   * Create a new student.
   */
  public Student() {
    Student.totalStudents++;
  }
  
  /**
   * Create a new student with the first name f
   * and the last name l.
   */
  public Student(String f, String l) {
    this.firstName = f;
    this.lastName = l;
    Student.totalStudents++;
  }
  
  /**
   * Return the total number of students.
   */
  public static int getTotalStudents() {
    return Student.totalStudents;
  }
  
  /** Set the first name of the student. */
  public void setFirstName(String fn) {
    this.firstName = fn;
  }
  
  /** Return the first name of the student. */
  public String getFirstName() {
    return this.firstName;
  }
  
  /** 
   * Compare this student's first name and last
   * name with those of the given student. Return
   * true if they are equal and false otherwise.
   */ 
  public boolean equals(Object o) {
    Student s = (Student) o;
    return this.firstName.equals(s.firstName)
      && this.lastName.equals(s.lastName);
  }
  
}
