The final grade in the course is a weighted average of your exam grade and the grade of your home assignments. Roughly speaking, the exam weight is 65%, while the home assignments are 35%. However, this simple weighted average only applies if :
1. Your exam grade is more than 55. Otherwise the final grade is the exam grade
2. your home assignments grade does not exceed your final grade by more than 25 points. Otherwise, a more complicated formula is used to compute your grade. This formula is captured by the following Smalltalk class:
Class Student Object name homework finalA finalB
^ 0.65 * (self final) + 0.35 * (self truncate: 25)
finalB isNil ifTrue: [ ^finalA ].
| extraWeight |
(homework - self final) < maxDiff ifTrue: [^ homework].