/** 
 *  A student class containing information
 *  and methods relating to a student.
 */
public class Student {
  /** first name of student. 
   *  This is an instance variable 
   */
  private String firstName;
  /** 
   * last name of student.
   */
  private String lastName;
  /**
   * total number of students.
   */
  private static int numStudents;
  
   /**
    * Create a new student using the first and
    * last name.
    */ 
  public Student(String fn, String ln) {
    this.firstName = fn;
    this.lastName = ln;
	 /* Increment the total number of students, held in the
     * static (class) variable numStudents, every time a
	  * new student is created.  This is how you get the
	  * total number of students created, or student count.
     */
    numStudents += 1;
  }    
  /** 
   * Create a new student settings default name to John Doe.
   */
  public Student() {
    this.firstName = "John";
    this.lastName = "Doe";
	 /* Increment the total number of students, held in the
     * static (class) variable numStudents, every time a
	  * new student is created.  This is how you get the
	  * total number of students created, or student count.
     */
    numStudents += 1;
  }
  /** 
   * returns the first and last name in a single string.
   */
  public String getName() {
    return this.firstName + " " + this.lastName;
  }
  /**
   * Returns the total number of students created.
   */
  public static int getNumStudents() {
    return numStudents;
  }
}

