package view;
import instructor.Instructor;

import java.util.Collection;

import schedule.Schedule;
/**
 * Attribute view object that shows the user a schedules
 * attributes. It is the main dialog box shown in Figure 
 * 2.4.4.1.
 * @author ldavid
 */ 
abstract class AttributeView {
	
	/**
	 * The schedule the scores correspond to
	 */
	public Schedule schedule;
	
	/**
	 * The scores shown on the dialog box
	 */
	public int constraintScore;
	public int prefScore;
	
    /**
     * The instructors listed next to their corresponding fairness
     * score and the fairness score itself are collections that
     * will be displayed in the table view of the attribute
     * view dialog
     */
    public Collection<Instructor> instructors;
    public Collection<String> fairness;
    
    /**
     * Function to return the Constraint score the current schedule has,
     * which represents how well a schedule meets constraints
     * @return int
     */
    /*@
      requires
      	// 
      	// The schedule is not null
      	//
      	(schedule != null);
      
      ensures
      	// 
      	// The output is a value from 0 to 100
      	//
      	(\result >= 0 && \result <= 100);
     @*/
    public abstract int getConstraintScore();
    
    /**
     * Function to return the Preference score of the current schedule,
     * which represents how well a schedule meets all instructor preferences
     * @return int
     */
    /*@
      requires
      	// 
      	// The schedule is not null
      	//
      	(schedule != null);
      
      ensures
      	// 
      	// The output is a value from 0 to 100
      	//
      	(\result >= 0 && \result <= 100);
     @*/
    public abstract int getPreferenceScore();
    
    /**
     * Function to return the fairness score the schedule gives a given 
     * instructor
     * @param instructor
     * @return int
     */
    /*@
      requires
      	// 
      	// The instructor is not null
      	//
      	(instructor != null)
      	
      		&& 
      	
      	// 
      	// The schedule is not null
      	//
      	(schedule != null);
      
      ensures
      	// 
      	// The output is a value from 0 to 100
      	//
      	(\result >= 0 && \result <= 100);
     @*/
    public abstract int getFairnessScore(Instructor instructor);
    
}