Package com.gophers.structures.grades
Class ProgramGrade
java.lang.Object
com.gophers.structures.grades.GradeTemplate
com.gophers.structures.grades.ProgramGrade
- All Implemented Interfaces:
Grade
Represents a grading structure specific to programming assignments, extending the generic
GradeTemplate with configuration and feedback specific to the program component of a course.
This class initializes test weightings and feedback maps based on configurations and calculates
the final grade based on the test results provided.-
Field Summary
Fields inherited from class com.gophers.structures.grades.GradeTemplate
feedbackMap, testMarks -
Constructor Summary
ConstructorsConstructorDescriptionProgramGrade(org.junit.runner.Result result) Constructs a newProgramGradewith the specified test results. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidInitializes the feedback map for program grading based on test weightings.protected voidAllocates test weightings for program grading by loading configuration values specific to program grading criteria.Methods inherited from class com.gophers.structures.grades.GradeTemplate
getMarks, getTestFeedback, getTotalMarks
-
Constructor Details
-
ProgramGrade
public ProgramGrade(org.junit.runner.Result result) Constructs a newProgramGradewith the specified test results. Initializes weightings and feedback for program-specific grading based on configuration.- Parameters:
result- TheResultobject containing JUnit test outcomes used for grading.
-
-
Method Details
-
allocateWeightings
protected void allocateWeightings()Allocates test weightings for program grading by loading configuration values specific to program grading criteria. This mapping is stored intestMarksand is used to calculate marks deductions for failed tests.- Specified by:
allocateWeightingsin classGradeTemplate
-
allocateFeedback
protected void allocateFeedback()Initializes the feedback map for program grading based on test weightings. This map allows specific feedback entries to be generated for each test case, reflecting the weightings and the status of each test in the grading criteria.- Specified by:
allocateFeedbackin classGradeTemplate
-