Class Cohort
java.lang.Object
Cohort
A group of students.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStudent
(Student student) Add the specifiedstudent
to the students of the cohort.Returns the list of students of the cohort.void
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.
-
Constructor Details
-
Cohort
Constructs a cohort with a name equals to the specifiedname
and no students.- Parameters:
name
- the name of the constructed Cohort
-
-
Method Details
-
addStudent
Add the specifiedstudent
to 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.
-