Complete one new implementation in an existing Open–Closed design.
ScoreReporter already works with the GradingPolicy interface. Its pass/fail and letter-grade policies are complete, and the reporter can use either one without knowing its rules. The reporter already references a third policy, HonorsPolicy, but that class has intentionally been left for you to implement.
Implement the missing honors behavior:
- A score of
90 or more returns "HIGH HONORS". - A score from
75 through 89 returns "HONORS". - A score below
75 returns "STANDARD".
Keep the existing design intact. Do not add an honors condition to ScoreReporter, and do not modify PassFailPolicy or LetterGradePolicy.
The reporter provides these operations:
hasPolicy(name) reports whether a policy is registered.policyCount() returns the number of registered policies.labelFor(policyName, score) returns the selected policy's label, or "UNKNOWN POLICY" when the name is not registered.report(policyName, student, score) returns "<student>: <label>", or "UNKNOWN POLICY" for an unknown policy.
Assume scores are between 0 and 100.