Assume that a class has four categories for calculating grades - tests, final exams, projects, and homework. Assume that tests are $40\%$ of the class grade, final exams are $30\%$ of the class grade, projects are $10\%$ of the class grade, and homework is $20\%$ of the class grade.
Should we multiply each score for each category by its category weights, add these results, then divide by the sum of the weights? For example: Let's say a students scores are
Tests: $84, 78, 84, 72$
Final exam: $78$ (just one score)
Projects: $86$ (just one score)
Homework: $87$ (just one score)
Should the class grade be $0.4\cdot 84 + 0.4\cdot 78 + 0.4\cdot 84 + 0.4\cdot 72 + 0.3\cdot 78 + 0.1\cdot 86 + 0.2\cdot 87 = 176.6$ (sum of products)
$0.4 + 0.4 + 0.4 + 0.4 + 0.3 + 0.1 + 0.2 = 2.2$ (sum of the weights for assignments)
Total grade: $176.6 / 2.2 = 80.27$
Or is there a different approach that should be used to calculate the grade for the course?
Thank you in advance.