package admin; import java.util.Collection; /** * This class contains the functionality allowing the administrative user * to override the time preferences of the instructors. */ public abstract class TimePreferenceEditing { Collection day; Collection instructors; String currentInstructor; boolean administratorOverride; /** * AddAdministratorOverride will change the scheduling algorithm to take * into account the preferences provided by the administrator as well as * those provided by the instructor. */ /*@ requires //The administrator override cannot already be selected. administratorOverride == false; ensures //The administrator override is now true. administratorOverride == true; @*/ abstract void addAdministratorOverride(); /** * RemoveAdministratorOverride will change the scheduling algorithm to * ignore any preferences provided by the administrator and only take * into account those preferences provided by the instructor. */ /*@ requires //The administrator override is currently selected. administratorOverride == true; ensures //The administrator override is no longer selected. administratorOverride == false; @*/ abstract void removeAdministratorOverride(); /** * SelectDifferentInstructor will populate the weekly view with the * time preferences of the selected instructor. */ /*@ requires //There must be at least one instructor in the collection of //instructors. (instructors.size() > 0); ensures //currentInstructor is now the selected instructor. (currentInstructor.equals(selectedInstructor)); @*/ abstract void selectDifferentInstructor(Instructor selectedInstructor); }