Package edu.pdx.cs410J.junit
Class Section
java.lang.Object
edu.pdx.cs410J.junit.Section
This class represents a section of a course being offered in a
given term during a given year.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStudent
(Student student) Enrolls a student in this sectionvoid
dropStudent
(Student student) Drops a student from this sectionint
Returns the number of students enrolled in this sectionReturns the course being offeredReturns the students enrolled in this sectionint
getTerm()
Returns the term in which this section is offeredint
getYear()
Returns the year in which this section is offered
-
Field Details
-
WINTER
The winter term- See Also:
-
SPRING
The spring term- See Also:
-
SUMMER
The summer term- See Also:
-
FALL
The fall term- See Also:
-
-
Constructor Details
-
Section
Creates a new section of a course being offered in the given term and year. Initially, no students are enrolled.- Throws:
IllegalArgumentException
- If theterm
is not one ofWINTER
,SPRING
,SUMMER
, orFALL
. (Great, now I've got that James Taylor song going through my head.)
-
-
Method Details
-
addStudent
Enrolls a student in this section -
dropStudent
Drops a student from this section- Throws:
IllegalArgumentException
- Thestudent
is not enrolled in this section
-
getClassSize
Returns the number of students enrolled in this section -
getCourse
Returns the course being offered -
getStudents
Returns the students enrolled in this section -
getTerm
Returns the term in which this section is offered -
getYear
Returns the year in which this section is offered
-