Enum Grade

  • All Implemented Interfaces:
    Serializable, Comparable<Grade>

    public enum Grade
    extends Enum<Grade>
    Grading aspects get a grade by a module runner. This enum represents the different grades that can be awarded.
    • Enum Constant Detail

      • CORRECT

        public static final Grade CORRECT
        An aspect is CORRECT, if there are no errors in it. A correct solution usually gets full score from an evaluator.
      • WRONG

        public static final Grade WRONG
        An aspect is WRONG, if the submission does not fully adhere to the requirements. Contrast WRONG with the other non-correct grades. WRONG aspects are incorrect by themselves. If an aspect was not graded as correct because there was a timeout, a delay or a dependency from other aspects, use one of the other faulty grades such as TIMEOUT, DELAYED, or SUBSEQUENT_ERROR.
      • SUBSEQUENT_ERROR

        public static final Grade SUBSEQUENT_ERROR
        An aspect is a SUBSEQUENT_ERROR, if a successful grading depends on other aspects to be correct.
      • TIMEOUT

        public static final Grade TIMEOUT
        An aspect has a TIMEOUT, if the module runner runs out of time when grading the aspect.
      • DELAYED

        public static final Grade DELAYED
        An aspect is DELAYED, if the module runner cannot award a final grade to the aspect, because that depends on manual or other processes that have take place after the module runner finishes.
      • MISSING

        public static final Grade MISSING
        An aspect is MISSING, if a module runner did not grade an aspect at all. The reasons is highly module runner dependent. Maybe it is a programming error in the module.
    • Method Detail

      • values

        public static Grade[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Grade c : Grade.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Grade valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getDisplayName

        public String getDisplayName()
      • isCorrect

        public static boolean isCorrect​(Iterable<Grade> grades)
        A collection of several aspects is CORRECT only, if all contained aspects are CORRECT. An empty set of grades is correct by definition.
        Parameters:
        grades - a collection of Grades
        Returns:
        true, if the given collection is CORRECT
      • isFaulty

        public static boolean isFaulty​(Iterable<Grade> grades)
        A collection of several aspects is faulty, if it contains at least one aspect that is either WRONG or TIMEOUT or SEUBSEQUENT_ERROR or MISSING. An empty set of grades is not faulty by definition.
        Parameters:
        grades - a collection of Grades
        Returns:
        true, if the given collection is faulty
      • isFaulty

        public boolean isFaulty()
        A grade is faulty, if it is either WRONG or TIMEOUT or SEUBSEQUENT_ERROR or MISSING.
        Returns:
        true, if this is faulty
      • isCorrect

        public boolean isCorrect()
        Returns:
        true, if this grade equals CORRECT.