package gradebook; /** * Contains an individual grade. */ public abstract class Grade { /** * The assignment the grade is for (it is contained in the gradebook's * list of assignments). */ GradedItem assignment; /** * the points entered. */ int points; /** * the total possible points. */ int totalPoints; /** * Calulates percentage based on points and totalPoints. */ /*@ requires // points to be set and wont divide by zero (points != 0) && (totalPoints != 0); ensures (\result != 0); @*/ abstract double percentage(); }