The official mark calculator has five major steps.
GED
Accumulated
Regular
Diploma
Check Prerequisites (PRQ relationships)
Removes credits when prereqs are not met (adds annotation.)
Check Course Equivalents (REG and CHA relationships)
Removes credits when an equivalent course has credit (adds annotation.)
Random piece of code that does stuff with zero credit marks
Removes the achievement date and school year from GED marks where there is a course equivalency annotation.
Changes the mark calculation method to unavailable for certain evaluated marks.
Waived Prerequisite Credit (TYP relationship)
Adds WPC marks
General Guidance
Achievement date/year should not be changed after they are initially assigned.
Check Prerequisites (RequiredPrerequisiteValidator)
This code would be better organized if it returned the marks (newly created in the method) that DON'T meet the prereqs instead of the modifying the calculated mark set in place (pass in a read only dictionary.)
The IsValidPrerequisite method should be broken into smaller methods.
Deal with Zero Credits (ZeroCreditValidator)
This should be integrated elsewhere in the calculator, the checks are highly specialized.
Should not be removing the achievement date/year on any marks.
Casts an ICalculatedMark to CalculatedMark to change the mark calculation method (should not be doing this.)
Waived Prerequisite Credits (WaivedPrerequisiteValidator)
Does not need to be recursive; can loop through until there is no previous course (TYP relationship.)