Test scores in an Array

 

I would say that there were two major challenges that I hit with this particular program. The first was with the time constraint. From the completion of the 8th challenge to the completion of this challenge, I really only had two days to complete this, so there was a LOT of trial and error.

I would say that one thing that was useful was in having a test file where I could test out each part of the program before compiling it together in one file. Learning not just how to write vectors, but how to use pointers and get the two to work together with functions was certainly not easy.

It's interesting how simple it looks once it's complete though. I suppose it's a little like making a perfect baguette.

On to the final.

Write a program that dynamically allocates an array large enough to hold a user-defined number of test scores. Once all the scores are entered, the array should be passed to a function that sorts them in ascending order. Another function should be called that calculates the average score. The program should display the sorted list of scores and averages with appropriate headings. Use pointer notation rather than array notation whenever possible.

Input Validation: Do not accept negative numbers for test scores.