Create an API to register students, add grades to them, and calculate GPA.
The API must have the following endpoints:
- POST /student - student registration (name, surname, personal number, course)
- POST /subject - subject registration (subject name, number of credits)
- POST /student/{studentId}/grade - adding a grade for the student (subject Id, score from 0 to 100)
- GET /student/{studentId}/grades - extracting the list of student grades
- GET /student/{studentId}/gpa - calculate the student's GPA
The GPA calculation function should have unit tests.
- Top 10 students with the highest GPA
- Top 3 subjects in which students get the most points on average
- Top 3 subjects in which students get the least points on average