Grades
Class GradeBook

java.lang.Object
  extended by Grades.GradeBook

public abstract class GradeBook
extends java.lang.Object

Gradebook represents a class gradebook with assignments, students, and a curve


Field Summary
(package private)  java.util.List<Assignment> assignments
          The collection that contains assignments for a class
(package private)  java.util.Collection<Assignment> averages
          The collection that contains averages of each categorys grades for a class
(package private)  Curve curve
          The curve of a class
(package private)  java.util.Collection<Student> students
          The collection that contains Students for a class
 
Constructor Summary
GradeBook()
           
 
Method Summary
(package private) abstract  void editData(java.util.List<Student> roster, Student student, Grade input)
          Allows users to enter data into fields and ensures the number is within a reasonable range and that the student exists /*@ requires roster.contains(student); ensures input.grade < 400 && input.grade > -100);
(package private) abstract  void setCurve(java.util.List<java.lang.Double> cutoffs)
          Allows users to set a curve and ensures it is a number between 0 and 100
(package private) abstract  java.util.Collection<Student> sortBy(int col, java.util.List<Student> students)
          Ensures the gradebook is sorted according to a rule and that the column is valid
(package private) abstract  boolean sortedAscending(java.util.List<Student> students, int col)
          Return true if the given list is sorted in ascending order
(package private) abstract  boolean sortedByName(java.util.List<Student> students)
          Return true if the given list is sorted lexicographically by name, according to the semantics * of java.lang.String.compareTo().
(package private) abstract  boolean sortedByRevName(java.util.List<Student> students)
          Return true if the given list is sorted lexicographically by name, according to the semantics * of java.lang.String.compareTo().
(package private) abstract  boolean sortedDescending(java.util.List<Student> students, int col)
          Return true if the given list is sorted in ascending order
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

assignments

java.util.List<Assignment> assignments
The collection that contains assignments for a class


averages

java.util.Collection<Assignment> averages
The collection that contains averages of each categorys grades for a class


students

java.util.Collection<Student> students
The collection that contains Students for a class


curve

Curve curve
The curve of a class

Constructor Detail

GradeBook

public GradeBook()
Method Detail

editData

abstract void editData(java.util.List<Student> roster,
                       Student student,
                       Grade input)
Allows users to enter data into fields and ensures the number is within a reasonable range and that the student exists /*@ requires roster.contains(student); ensures input.grade < 400 && input.grade > -100);


setCurve

abstract void setCurve(java.util.List<java.lang.Double> cutoffs)
Allows users to set a curve and ensures it is a number between 0 and 100


sortBy

abstract java.util.Collection<Student> sortBy(int col,
                                              java.util.List<Student> students)
Ensures the gradebook is sorted according to a rule and that the column is valid


sortedByName

abstract boolean sortedByName(java.util.List<Student> students)
Return true if the given list is sorted lexicographically by name, according to the semantics * of java.lang.String.compareTo().


sortedByRevName

abstract boolean sortedByRevName(java.util.List<Student> students)
Return true if the given list is sorted lexicographically by name, according to the semantics * of java.lang.String.compareTo().


sortedAscending

abstract boolean sortedAscending(java.util.List<Student> students,
                                 int col)
Return true if the given list is sorted in ascending order


sortedDescending

abstract boolean sortedDescending(java.util.List<Student> students,
                                  int col)
Return true if the given list is sorted in ascending order