Reference no: EM132211359
Question :
Write a program that reads a set of information related to students in C++ class and prints them in a table format. The information is stored in a file called data.txt.
Each row of the file contains student number, grade for assignment 1, grade for assignment 2, grade for assignment 3, and grade for assignment 4.
Your main program should read each row, pass the grades for the three assignments to a function called ProcessRow to calculate the average of the grades, minimum of the four assignments, and the maximum of the four assignments.
The results (average, maximum, and minimum) should be returned to the main program and the main program prints them on the screen in a table format.
For example, if the file includes
126534 7 8 10 7
321345 5 6 4 9
324341 8 3 8 5
your program should print
Std-Id A1 A2 A3 A4 Min Max Average
---------------------------------------------------
126534 7 8 10 7 7 10 8
321345 5 6 4 9 4 9 6
324341 8 3 8 5 3 8 6
You must use call by reference to do the above question.