package curve; import view.WindowFrame; import view.Window; import java.awt.Color; import gradebook.ClassGradebook; /** * Main window for the curving tool. * Dervived from Section 2.6.3 of the requirements. * @author crahm */ public abstract class CurveToolWindow extends WindowFrame { /** * Current grade curve of the class. */ GradeCurve currentCurve; /** * Current class gradebook */ ClassGradebook gradebook; /** * 3/8 A's Curve Window */ CurveThreeEigthsAsWindow threeEigths; /** * Find Gaps Curve Window */ CurveFindGapsWindow findGaps; /** * Insert Percentage Curve Window */ CurveInsertPercentageWindow insertPercent; /** * Method to modify the color representing a particular letter grade. * @param letter the LetterGradeBoundary whose color we are modifying. * @param color the new color to set the letter grade to. */ /*@ requires // //letter is a valid letter in the pie chart (i.e. A, B, C, D, F). // (letter.equals("A") || letter.equals("B") || letter.equals("C") || letter.equals("D") || letter.equals("F")) ; /*@ ensures // //color on letter grade boundary is changed to the new color. // (letter.color.equals(color)) ; @*/ abstract void modifyColor(LetterGradeBoundary letter, Color color); /** * Method to open the 3/8 A's Curving Window. Triggered when the button is pushed. */ /*@ ensures // // 3/8 A's Curving Window is opened. // (\exists Window w ; (w.open.contains(threeEigths) && (threeEigths != null))); @*/ abstract void curveThreeEigthsAs(); /** * Method to open the Find Gaps Curving Window. Triggered when the button is pushed. */ /*@ ensures // // Find Gaps Curving Window is opened. // (\exists Window w ; (w.open.contains(findGaps) && (findGaps != null))); @*/ abstract void curveFindGaps(); /** * Method to open the Insert Percentage Curving Window. Triggered when the button is pushed. */ /*@ ensures // // Insert Percentage Curving Window is opened. // (\exists Window w ; (w.open.contains(insertPercent) && (insertPercent != null))); @*/ abstract void curveInsertPercentage(); }