edu.pdx.cs399J.grader
Class Student

java.lang.Object
  extended by edu.pdx.cs399J.grader.NotableImpl
      extended by edu.pdx.cs399J.grader.Student
All Implemented Interfaces:
Notable

public class Student
extends NotableImpl

This class represents a student who is taking CS399J.


Constructor Summary
Student(String id)
          Creates a new Student with a given id.
 
Method Summary
 void addLate(String assignmentName)
          Makes note of the name of an assignment that is late
 void addResubmitted(String assignmentName)
          Makes note of the name of an assignment that is resubmitted
 boolean equals(Object o)
          Two Students are equal if they have the same id
 String getEmail()
          Returns the email address of this Student
 String getFirstName()
          Returns the first name of this Student
 String getFullName()
          Returns this Student's full name including first, last, and nick names.
 Grade getGrade(String assignmentName)
          Returns the Grade a student received on an assignment of a given name.
 Set getGradeNames()
          Returns the names of the assignments for which this Student has received a Grade.
 String getId()
          Returns the id of this Student
 String getLastName()
          Returns the last name of this Student
 List<String> getLate()
          Returns the names of all of the assignments that are late.
 String getMajor()
          Returns the major of this Student
 String getNickName()
          Returns the nick name of this Student
 List<String> getResubmitted()
          Returns the names of all of the assignments that are resubmitted.
 String getSsn()
          Returns the social security number of this Student
 int hashCode()
          Two students that are equal must have the same hash code
 boolean isDirty()
          If any of its grades is dirty, then the student is dirty
static void main(String[] args)
          Main program that is used to add a Student to a grade book.
 void makeClean()
          Marks this Student as being clean
 void setEmail(String email)
          Sets the email address of this Student
 void setFirstName(String firstName)
          Returns the last name of this Student
 void setGrade(String assignmentName, Grade grade)
          Sets a Grade a student received on an assignment of a given name.
 void setLastName(String lastName)
          Returns the last name of this Student
 void setMajor(String major)
          Sets the major of this Student
 void setNickName(String nickName)
          Returns the nick name of this Student
 void setSsn(String ssn)
          Sets the social security number of this Student
 String toString()
          Returns a brief textual description of this Student
 
Methods inherited from class edu.pdx.cs399J.grader.NotableImpl
addNote, getNotes, removeNote, setDirty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Student

public Student(String id)
Creates a new Student with a given id. An example of an id is the student's UNIX login name.

Method Detail

getId

public String getId()
Returns the id of this Student


getFirstName

public String getFirstName()
Returns the first name of this Student


setFirstName

public void setFirstName(String firstName)
Returns the last name of this Student


getLastName

public String getLastName()
Returns the last name of this Student


setLastName

public void setLastName(String lastName)
Returns the last name of this Student


getNickName

public String getNickName()
Returns the nick name of this Student


setNickName

public void setNickName(String nickName)
Returns the nick name of this Student


getFullName

public String getFullName()
Returns this Student's full name including first, last, and nick names.


getEmail

public String getEmail()
Returns the email address of this Student


setEmail

public void setEmail(String email)
Sets the email address of this Student


getSsn

public String getSsn()
Returns the social security number of this Student


setSsn

public void setSsn(String ssn)
Sets the social security number of this Student


getMajor

public String getMajor()
Returns the major of this Student


setMajor

public void setMajor(String major)
Sets the major of this Student


getGradeNames

public Set getGradeNames()
Returns the names of the assignments for which this Student has received a Grade.


getGrade

public Grade getGrade(String assignmentName)
Returns the Grade a student received on an assignment of a given name. If the student has no grade for that assignment, null is returned.


setGrade

public void setGrade(String assignmentName,
                     Grade grade)
Sets a Grade a student received on an assignment of a given name.


getLate

public List<String> getLate()
Returns the names of all of the assignments that are late.


addLate

public void addLate(String assignmentName)
Makes note of the name of an assignment that is late


getResubmitted

public List<String> getResubmitted()
Returns the names of all of the assignments that are resubmitted.


addResubmitted

public void addResubmitted(String assignmentName)
Makes note of the name of an assignment that is resubmitted


makeClean

public void makeClean()
Marks this Student as being clean

Overrides:
makeClean in class NotableImpl

isDirty

public boolean isDirty()
If any of its grades is dirty, then the student is dirty

Overrides:
isDirty in class NotableImpl

equals

public boolean equals(Object o)
Two Students are equal if they have the same id

Overrides:
equals in class Object

hashCode

public int hashCode()
Two students that are equal must have the same hash code

Overrides:
hashCode in class Object

toString

public String toString()
Returns a brief textual description of this Student

Overrides:
toString in class Object

main

public static void main(String[] args)
Main program that is used to add a Student to a grade book.



Copyright © 2000-2009 Portland State University. All Rights Reserved.