sglavoie/uol-grades-calculator

The code does not calculate the weighted average of modules taken

Closed this issue · 0 comments

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 the level property found in config.yml to map each module to a weight. Done without relying on a 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 a YAML fixture on a subset of the modules). Not using any additional YAML file.
  • Add tests to check that the weighted average is calculated correctly.

Analysis

  • We need to use config.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.