package users; import java.util.Collection; import course.*; /** * Instructors have the ability to create, edit, manage, and remove tests and questions. Instructors also act as administrators, * managing all users who use the program. Each instructor owns a single question bank to distribute tests for his/her various * courses. Further information on Instructors can be found in Section 2.1 of the requirements documentation. * */ public abstract class Instructor extends User { /** * An instructor can teach multiple courses, as well as multiple sections for each course. */ Collection courses; /** * Default constructor for an Instructor. * @param userID The unique identifier of an Instructor * @param realName The given name of the Instructor */ public Instructor(String userID, String realName) { } /** * Adds a course that this instructor teaches. * @param Course Course to be added to the instructors list of courses * pre: // the course list does not contain c (!courses.contains(c)); post: // the c must be in the instructors course list // and the size of the course list must be one larger. (courses'.contains(c)) && (courses'.size() == courses.size() + 1); */ public abstract void addCourse(Course c); /** * Removes a course that this instructor teaches * @param Course Course to be removed from the instructors courses * pre: //the course list contains c (courses.contains(c)); post: // c must not be in the instructors course list // the size of the course list must be one smaller (!courses'.contains(c)) && (courses'.size() == courses.size() - 1); */ public abstract void removeCourse(Course c); }