Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Language C++ The assignment is as follows. Write a program to calculate students

ID: 3621280 • Letter: L

Question

Language C++

The assignment is as follows. Write a program to calculate students' average test scores and their grades.
(I am guessing after the test scores are averaged it will print out a letter grade along with the average test for each student.)

You may assume the following input data:

Johnson 85 83 77 91 76
Aniston 80 90 95 93 48
Cooper 78 81 11 90 73
Gupta 92 83 30 69 87
Blair 23 45 96 38 59
Clark 60 85 45 39 67
Kennedy 77 31 52 74 83
Bronson 93 94 89 77 97
Sunny 79 85 28 93 82
Smith 85 72 49 75 63

Use three arrays: a one-dimensional array to store the students' names, a two dimensional parallel array to store test scores, and a one-dimensional array to store grades. Your program must contain the following functions: a function to read and store data into two arrays, a function to calculate the average test score and grade, and a function to output the results. Have your program also output the class average.

Explanation / Answer

1 #include 02 #include 03 #include 04 #include 05 06 using namespace std; 07 08 void calculateAverage(ifstream& inp, double& classAvg); 09 void calculateGrade(float average); 10 11 12 int main(){ 13 string last_name; 14 //int numberofscores; 15 float average=0; 16 double score1=0, score2=0, score3=0, score4=0, score5=0; 17 18 19 20 ifstream inData; 21 ofstream outData; 22 23 inData.open("\scores.txt"); 24 outData.open("\scorecomplete.txt"); 25 inData >> last_name >> score1 >> score2 >> score3 >> score4 >> score5; 26 outData