package schedule;
import java.util.Collection;
import java.sql.Time;

 /**
   * This object defines the time constraint between all lecture and lab sections.
   * The time an admin sets through the dialog box seen in  section 2.4.1.4 of the 
   * Functional Requirements, the algorithm will make sure that lectures and their 
   * corresponding labs are scheduled within the same specified. 
   *     <p>
   * This object is derived from Section 2.4.1.4 of the Functional Requirements.
   */
abstract class AdminLectLabTimeConstraint {
   public ScheduleTime lectLabProx;
   public int lectLabscore;
   public Collection<Integer> hours;
   public Collection<Integer> mins;

   /**
     * This method is called when the "Hours" drop down menu is set in the dialog box as
     * seen in the Functional Requirements section 2.4.1.4 
     */
     /*@
     requires
      	// 
      	// The hour is not null
      	//
      	(hour != 0);
      
      ensures
      	// 
      	// the hour time between lecture and lab is valid
      	//
      	(lectLabProx.hour == hour);
     @*/
   public abstract void setHourConstraint(int hour);
   
   /**
     * This method is called when the "Minutes" drop down menu is set 
     * in the dialog box as seen in the Functional Requirements section 2.4.1.4 
     */
    /*@
     requires
      	// 
      	// The minute is not null
      	//
      	(mins != null);
      
      ensures
      	// 
      	// the time in minutes between lecture and lab is valid
      	//
      	(lectLabProx.minute == mins);
     @*/
   public abstract void setMinConstraint(int mins);

   /** 
     * This method is called when the admin clicks the save button 
     * to apply this time constraint to all lecture/lab courses. 
     */
    /*@
     requires
      	// 
      	// The hour and minute time is not null
      	//
      	(lectLabProx.hour != null)

		&&
	(lectLabProx.minute != null);
      
      ensures
      	// 
      	// the time inputed is saved
      	//
      	();
     @*/
   public abstract void saveLectLabTimeConstraint();

}