Program that opens data file containing test scores

Hi, I am new to programming and I am completing an extra credit assignment for my C++ programming class and I do not even know where to begin. Here is the prompt:

Dr. Green, Chair of the Department of Physics, would like to have a program, which can read a file containing students’ scores, generate statistical information (average and median) and print out detailed grade distribution. We assume students’ test scores can be floating point values. The number of students is within 500. You will learn to read data from a txt file in this programming exercise.

We are not allowed to use any pre-defined functions (statistical, mathematical, or sorting). Any help or even a source code would be very appreciated. Thank you in advance!
I don't want to do your homework for you. That would obviate the purpose of homework.

Because this is an extra credit assignment, it is meant to stretch you a little bit.

Here's what you need to do.

Determine the steps required to solve the problem. In this case, they are pretty simple.
1.  Read in the data
2.  Perform the calculations
3.  Print out the results


Next, look at the data that you need to work with. There is a big clue here:
We assume students’ test scores can be floating point values. The number of students is within 500. You will learn to read data from a txt file in this programming exercise.


So to begin the program, you need to read in the test data. Do you know the format of the file? Does it contain just a bunch of raw numbers, or does it contain student names associated with their scores? You need to know what data format to expect before you can figure out how to read it in.

Next you will have to calculate average and median. Do you know how to calculate the average and median values of a set of values? If you need to sort the data, a simple bubble sort will suffice. You can google bubble sort to see how that works.

Last, you need to display "detailed grade distribution". This could mean any of a number of things:
1. Just print out the values you just calculated.
2. Draw a curve of distribution (basically a histogram)
3. Calculate the standard deviation
4. ????

You will need to talk to your teacher about what is needed here.
Topic archived. No new replies allowed.