"This program will read grades from two different files (one at a time) and do some simple analytical operations on those grades -- identifying the maximum, minimum, median, and mean."
"Information about the scores will be stored in an array. But, the array will not hold the scores themselves -- instead it will record the number of occurrences of each particular score."
So, I have an assignment where I need to input 2 datafiles, "data1.txt" and "data2.txt", and find the max, min, median, and mean. I need to use the main function, as well as readData and analyzeData functions.
The readData function opens and reads the specified data file, counting the scores that are found inside.
Parameters:
fileName: (string input) the name of the file to read
dataCounts: (integer array output) the scores found in the file
totalScores: (integer output) the total number of scores found
The analyzeData function analyzes the data described by the array given to it, computing desired statistics
Parameters:
dataCounts (integer array input) describes the values of data
totalScores (integer input) the number of scores described
maximum (integer output) the maximum score
minimum (integer output) the minimum score
median (integer output) the median scores
mean (double output) the average (mean)
this is what i have done so far;
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
void readData():
//opens and reads the specified data file, counting the scores that are found inside.
void analyzeData():
//analyzes the data described by the array given to it, computing desired statistics
int main()
{
/*analyzes the data in TWO data files, named "data1.txt" and "data2.txt"
and displays the maximum, minimum, median, and mean for each file.
There will be NO input from the keyboard*/
}
what should i do next? how do I use incorporate data1 and data2?

New Topic/Question
Reply



MultiQuote








|