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

Design, then write a complete C++ program to output testscores for a class. (You

ID: 3610903 • Letter: D

Question

Design, then write a complete C++ program to output testscores for a class. (Your design, which counts 50% must include thealgorithms for main and for each of the functionsyou define; for the functions you define, also identify thefunction parameters and whether they are passed by value or byreference.) Input: The fisrt 10 floating point values ina data file a:test4.txt are the correct answers to a math test.Next the file contains data for each of the 14 students in theclass who took the test: the student ID followed by student's 10answers. Sample data could be 20.3 41.7 9.5 -3.0 -78.2 -5.0 4.8 68.1 14.3 HU123 20.3 12.2 -8.0 -3.0 75.2 -78.2 -3.0 4.8 68.1 14.3 SM456 19.0 41.7 9.5 -3.0 70.0 -78.2 -5.0 4.8 68.1 14.3 ..... Processing: Do not use global variables.Input and output use files, which are opened in main. Two functionsare required; more may be used. The function readValues is to read 10 inputvalues from an input file and store them in an array. In main, acall to readValues is used to obtain an answer keyarray; later a call to readValues is used toobtain an array of student answers. Define a function computeScore, which hasboth the answer key array and a student answer array as parameters;it computes the number correct (0 to 10) and makes the valueavailable in main. Output: Each line of the output file containsa student ID and that student's score. For example Student ID      Score HU123             6 SM456             8 ......... Design, then write a complete C++ program to output testscores for a class. (Your design, which counts 50% must include thealgorithms for main and for each of the functionsyou define; for the functions you define, also identify thefunction parameters and whether they are passed by value or byreference.) Input: The fisrt 10 floating point values ina data file a:test4.txt are the correct answers to a math test.Next the file contains data for each of the 14 students in theclass who took the test: the student ID followed by student's 10answers. Sample data could be 20.3 41.7 9.5 -3.0 -78.2 -5.0 4.8 68.1 14.3 HU123 20.3 12.2 -8.0 -3.0 75.2 -78.2 -3.0 4.8 68.1 14.3 SM456 19.0 41.7 9.5 -3.0 70.0 -78.2 -5.0 4.8 68.1 14.3 ..... Processing: Do not use global variables.Input and output use files, which are opened in main. Two functionsare required; more may be used. The function readValues is to read 10 inputvalues from an input file and store them in an array. In main, acall to readValues is used to obtain an answer keyarray; later a call to readValues is used toobtain an array of student answers. Define a function computeScore, which hasboth the answer key array and a student answer array as parameters;it computes the number correct (0 to 10) and makes the valueavailable in main. Output: Each line of the output file containsa student ID and that student's score. For example Student ID      Score HU123             6 SM456             8 ......... Output: Each line of the output file containsa student ID and that student's score. For example Student ID      Score HU123             6 SM456             8 .........

Explanation / Answer

please rate - thanks #include #include using namespace std; void readValues(double[],ifstream &); int computeScore(double[],double[]); int main() { string id ; int i,numStudents=14; double answerkey[10],answers[10]; ifstream in; in.open("test4.txt");          //open file   if(in.fail())            //is it ok?        { cout
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