/** * A student who is a test subject for the psychology experiment scheduler. * * @author Dr. Jody Paul * @version 14 February 2006 */ public class Student { /** Unique Student ID number. */ private int studentID; /** Student's name. */ private String name; /** * Construct object of class Student. * @param theName this student's name * @param theID this student's ID numbers */ public Student(String theName, int theID) { name = theName; studentID = theID; } /** * Retrieves the name of the student * @return the name of the student */ public String getName() { return name; } /** * Retrieves the ID of the student * @return the ID of the student */ public int getID() { return studentID; } /** * Determines if two Student objects are equivalent, * that is, they have the same student name and ID values. * @param student the student to compare this object to * @return true if the names and IDs are the same */ public boolean equals(Student student) { boolean nameSame = this.getName().equals(student.getName()); boolean idSame = (this.getID() == student.getID()); return (nameSame && idSame); } }