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

Having a bit of trouble in my c++ class, was wondering if anyone can help. Write

ID: 3630771 • Letter: H

Question

Having a bit of trouble in my c++ class, was wondering if anyone can help.
Write a program to calculate students' average test scores and their grades. 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 68 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 (parallel) two-dimensional array to store the test scores, and a parallel one-dimensional aray to store grades. Your program must contain at least 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.

Thanks for any help.

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
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote