My name is James. I am currently taking a c++ class and I have a professor that is less than desirable but is the only one that is teaching the class. I am in need of assistance with some code. At least getting it started anyway.
Here is the assignment:
Write a program for the following problem. You're given a file that contains a collection of IDs and scores(type int) for an exam in your computer course. You're to compute the average of thes scores and assiggn grades to each student according to the following rule:
If a student's score is within 10 points (above or below) of the average, assign a grade of satisfactory. If the score is more than 10 points above average, assign a grade of outstanding. If the score is more than 10 points below average, assign a grade of unsatisfactory.
The output from your program should consist of a labeled three-column list that shows each ID, score, and corresponding grade. As part of the solution, your program should include functions that correspond to the function prototypes that follow.
//reads exam scores into array scores void readStuData (ifstream &rss, //IN: data file int scores, //OUT: the scores int id, //OUT: the IDs int &count, //OUT: Number of students read bool &tooMany); //OUT: A flag to indicate that more //than MAX_SIZE scores items are in //input file. //computes average of count student scores float mean(int scores, int count); //Displays a table showing each student's ID, score and grade //on a separate line //Uses: printGrade void printTable(int score, int ID, int count); //Prints student grade after comparing oneScore to average void printGrade(int oneScore, float average);
That is the layout that I have been given by my book. I'm not looking for the entire answer. I am just wondering if somebody can assist me by possibly giving me some pseudo code that I could refer to. I have no clue as to how to start or even where to start. Also, when it comes time to call the functions into the main function I don't know how to do that when it comes to the parameters and calling the function.
The help is greatly appreciated.