Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Calculating the average of student

$
0
0
Hello there everyone,

I am having problem with this question: Given a list of test results (each with a test date, Student ID, and the student’s Score), return the Final Score for each student. A student’s Final Score is calculated as the average of his/her 5 highest test scores. You can assume each student has at least 5 test scores.

Now, here is the thing. I do not want the answer.

I tried the hashing, but hashing can provide key with addresses so it did not work for me. I thought of using array list the iterate thought to calculate the average and return the top five score, but how do I assign the numbers with the studentID ? such as, say I want the output to be: Mike, 15. Is not this what the question requires ?! to get the student ID and the average number. Please, help me out with some clues, I am learning.

Thanks,

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>