package course; import users.*; import java.util.Collection; import java.util.List; /** * This course divides the students and graders in a particular course * into various sections. * This class pertains to the Administration requirements document, section 2.8, as it * allows organization of students and graders into various sections of various courses. */ public abstract class Section { Course course; Collection students; Collection graders; public Section(Course c) { } /** * Adds a student to this section pre: // student s must not be in the collection of students (!students.contains(s)); post: // student s must be in the list // the collection of students must be one greater (students'.contains(s)) && (students'.size() == students.size()+1); */ public abstract void addStudent(Student s); /** * Adds a grader to this section pre: // grader g must not be in the collection of graders (!graders.contains(g)); post: // grader g must be in the list // the collection of graders must be one greater (graders'.contains(g)) && (graders'.size() == graders.size()+1); */ public abstract void addGrader(Grader g); /** * Removes a student from this section pre: // student s must be in the collection of students (students.contains(s)); post: // student s must not be in the list // the collection of students must be one smaller (!students'.contains(s)) && (students'.size() == students.size()-1); */ public abstract void removeStudent(Student s); /** * Removes a grader from this section pre: // grader s must be in the collection of graders (graders.contains(g)); post: // grader s must not be in the list // the collection of graders must be one smaller (!graders'.contains(g)) && (graders'.size() == graders.size()-1); */ public abstract void removeGrader(Grader g); public abstract Collection getStudents(); public abstract Collection getGraders(); }