|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.pdx.cs399J.junit.Section
public class Section
This class represents a section of a course being offered in a given term during a given year.
| Field Summary | |
|---|---|
static int |
FALL
The fall term |
static int |
SPRING
The spring term |
static int |
SUMMER
The summer term |
static int |
WINTER
The winter term |
| Constructor Summary | |
|---|---|
Section(Course course,
int term,
int year)
Creates a new section of a course being offered in the given term and year. |
|
| Method Summary | |
|---|---|
void |
addStudent(Student student)
Enrolls a student in this section |
void |
dropStudent(Student student)
Drops a student from this section |
int |
getClassSize()
Returns the number of students enrolled in this section |
Course |
getCourse()
Returns the course being offered |
Set<Student> |
getStudents()
Returns the students enrolled in this section |
int |
getTerm()
Returns the term in which this section is offered |
int |
getYear()
Returns the year in which this section is offered |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int WINTER
public static final int SPRING
public static final int SUMMER
public static final int FALL
| Constructor Detail |
|---|
public Section(Course course,
int term,
int year)
IllegalArgumentException - If the term is not one of WINTER,
SPRING, SUMMER, or FALL.
(Great, now I've got that James Taylor song going through
my head.)| Method Detail |
|---|
public void addStudent(Student student)
public void dropStudent(Student student)
IllegalArgumentException - The student is not enrolled in this sectionpublic int getClassSize()
public Course getCourse()
public Set<Student> getStudents()
public int getTerm()
public int getYear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||