The code does not calculate the weighted average of modules taken
Closed this issue · 0 comments
sglavoie commented
When I read the results from the program, I want to know whether we are talking about the unweighted vs the weighted average across all modules (ideally, both) so I can know how hard I really need to work to maintain a 4.0 GPA. 😎
Acceptance
The program calculates the weighted average using theDone without relying on alevel
property found inconfig.yml
to map each module to a weight.config.yml
file.- The program outputs both the unweighted average as well as the weighted average across all modules.
- The program does the conversion from the UK weighted average grade to a US GPA/ECTS equivalent based on the weighted average (can also consider the unweighted average, which is done at the moment).
Tasks
Add tests to check whether we are retrieving values correctly (not by mocking the values themselves but by considering aNot using any additional YAML file.YAML
fixture on a subset of the modules).- Add tests to check that the weighted average is calculated correctly.
Analysis
We need to useconfig.yml
, where we store the value of the level for each module.- Furthermore, the weight for a given level is already known. Because this is extremely unlikely to change, we can just hard-code that ratio in the code as
1:3:5
.