edu.pdx.cs399J.grader
Class GradeBook

java.lang.Object
  extended by edu.pdx.cs399J.grader.GradeBook

public class GradeBook
extends Object

This class represents a grade book that contains information about a CS399J class: the assignments, the students and their grades.

Since:
Fall 2000
Author:
David Whitlock

Constructor Summary
GradeBook(String className)
          Creates a new GradeBook for a given class
 
Method Summary
 void addAssignment(Assignment assign)
          Adds an Assignment to this class
 void addStudent(Student student)
          Adds a Student to this GradeBook
 boolean containsStudent(String id)
          Returns whether or not this grade book contains a student with the given id.
 Assignment getAssignment(String name)
          Returns the Assignment of a given name
 Set<String> getAssignmentNames()
          Returns the names of the assignments for this class
 String getClassName()
          Returns the name of the class represented by this GradeBook
 int getCRN()
          Returns the Course Request Number (CRN) for this grade book.
 Student getStudent(String id)
          Returns the Student with the given id.
 Set<String> getStudentIds()
          Returns the ids of all of the students in this class
 boolean isDirty()
          Returns true if this GradeBook has been modified.
static void main(String[] args)
          Main program that is used to create a GradeBook
 void makeClean()
          Marks this GradeBook as being clean
 void removeStudent(Student student)
          Removes a Student from this GradeBook
 void setCRN(int crn)
          Sets the Course Request Number (CRN) for this grade book.
 void setDirty(boolean dirty)
          Sets the dirtiness of this GradeBook
 String toString()
          Returns a brief textual description of this GradeBook.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GradeBook

public GradeBook(String className)
Creates a new GradeBook for a given class

Method Detail

getClassName

public String getClassName()
Returns the name of the class represented by this GradeBook


getAssignmentNames

public Set<String> getAssignmentNames()
Returns the names of the assignments for this class


setCRN

public void setCRN(int crn)
Sets the Course Request Number (CRN) for this grade book.

Since:
Spring 2005

getCRN

public int getCRN()
Returns the Course Request Number (CRN) for this grade book.

Since:
Spring 2005

getAssignment

public Assignment getAssignment(String name)
Returns the Assignment of a given name


addAssignment

public void addAssignment(Assignment assign)
Adds an Assignment to this class


getStudentIds

public Set<String> getStudentIds()
Returns the ids of all of the students in this class


getStudent

public Student getStudent(String id)
Returns the Student with the given id. If a student with that name does not exist, a new Student is created.


addStudent

public void addStudent(Student student)
Adds a Student to this GradeBook

See Also:
containsStudent(java.lang.String)

removeStudent

public void removeStudent(Student student)
Removes a Student from this GradeBook


containsStudent

public boolean containsStudent(String id)
Returns whether or not this grade book contains a student with the given id.


setDirty

public void setDirty(boolean dirty)
Sets the dirtiness of this GradeBook


makeClean

public void makeClean()
Marks this GradeBook as being clean


isDirty

public boolean isDirty()
Returns true if this GradeBook has been modified.


toString

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

Overrides:
toString in class Object

main

public static void main(String[] args)
Main program that is used to create a GradeBook



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