Class Cohort
java.lang.Object
Cohort
A group of students.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStudent(Student student) Add the specifiedstudentto the students of the cohort.Returns the list of students of the cohort.voidPrint via the standard output the name of the cohort and all results associated to the students with their average grade.toString()Returns the name of the cohort.
-
Constructor Details
-
Cohort
Constructs a cohort with a name equals to the specifiednameand no students.- Parameters:
name- the name of the constructed Cohort
-
-
Method Details
-
addStudent
Add the specifiedstudentto the students of the cohort.- Parameters:
student- the student to be added to the cohort
-
getStudents
Returns the list of students of the cohort.- Returns:
- the list of students of the cohort.
-
printStudentsResults
public void printStudentsResults()Print via the standard output the name of the cohort and all results associated to the students with their average grade. -
toString
Returns the name of the cohort.
-