Package edu.pdx.cs410J.grader.gradebook
Class GradeBook
java.lang.Object
edu.pdx.cs410J.grader.gradebook.GradeBook
This class represents a grade book that contains information about
a CS410J class: the assignments, the students and their grades.
- Since:
- Fall 2000
- Author:
- David Whitlock
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAssignment(Assignment assignment) Adds anAssignmentto this classaddStudent(Student student) Adds aStudentto thisGradeBookbooleanReturns whether or not this grade book contains a student with the given id.voidforEachStudent(Consumer<Student> consumer) getAssignment(String name) Returns theAssignmentof a given nameReturns the names of the assignments for this classReturns the name of the class represented by thisGradeBookintgetCRN()Returns the Course Request Number (CRN) for this grade book.getLetterGradeForScore(Student.Section section, double score) getLetterGradeRanges(Student.Section section) getSectionName(Student.Section section) getStudent(String id) Returns the ids of all the students in this classbooleanisDirty()Returnstrueif thisGradeBookhas been modified.static voidMain program that is used to create aGradeBookvoidMarks thisGradeBookas being cleanvoidremoveStudent(Student student) Removes aStudentfrom thisGradeBookvoidsetCRN(int crn) Sets the Course Request Number (CRN) for this grade book.voidsetDirty(boolean dirty) Sets the dirtiness of thisGradeBookvoidsetSectionName(Student.Section section, String sectionName) toString()Returns a brief textual description of thisGradeBook.
-
Constructor Details
-
GradeBook
Creates a newGradeBookfor a given class
-
-
Method Details
-
getSections
-
getClassName
Returns the name of the class represented by thisGradeBook -
getAssignmentNames
Returns the names of the assignments for this class -
setCRN
Sets the Course Request Number (CRN) for this grade book.- Since:
- Spring 2005
-
getCRN
Returns the Course Request Number (CRN) for this grade book.- Since:
- Spring 2005
-
getAssignment
Returns theAssignmentof a given name -
addAssignment
Adds anAssignmentto this class- Returns:
assignmentso that method calls can be chained
-
getStudentIds
Returns the ids of all the students in this class -
getStudent
-
studentsStream
-
addStudent
Adds aStudentto thisGradeBook- Returns:
studentso that calls can be chained- See Also:
-
removeStudent
Removes aStudentfrom thisGradeBook -
containsStudent
Returns whether or not this grade book contains a student with the given id. -
setDirty
Sets the dirtiness of thisGradeBook -
makeClean
Marks thisGradeBookas being clean -
isDirty
Returnstrueif thisGradeBookhas been modified. -
toString
Returns a brief textual description of thisGradeBook. -
main
Main program that is used to create aGradeBook -
getLetterGradeRanges
-
getLetterGradeForScore
-
forEachStudent
-
assignmentsStream
-
getSectionName
-
setSectionName
-