Question: USING C++ Information processing such as computing averages, sorting data and displaying the results is something that is used ubiquitously. Assume the course records for
USING C++


Information processing such as computing averages, sorting data and displaying the results is something that is used ubiquitously. Assume the course records for a particular course are in a file named: "Grades.txt" (this file will always serve as the input file for your program). The input file is in exactly the following format. Each line contains a student's x.500id, then one space, then five quiz scores. The quiz numbers can be real numbers (numbers that contain fractional components) and are each separated by one space For example, three entries in the file Grades.txt" might contain the following data: liux0006 90 80 90 100 85 olson038 95 95 90 93 85 kumar010 90 85 85 95 92 For each student, your program should read in the data on each student from the file Grades.txt", and compute their final average using their five quiz scores, and store it with each student's quiz scores. Note that a two- dimensional array, or parallel arrays might be useful in this regard For example, after computing the averages for the three students above, your program will store the following data for each of them: liux0006 90 80 90 100 85 89 olson038 95 95 90 93 85 91.6 kumar010 90 85 85 95 92 89.4 (So liux0006 has a Final Average of 89.0,olson038 has a Final Average of 91.6, and kumar010 has a final average of 89.4) After doing this, your program should enter a continuation loop that 1. Prompts the user if they would like to sort the results by X.500 id or final grade, and 2. obtains the user's response; 3. 4. 5. sorts the data according to the user's response; displays the results to the console; ask the user if they would like to continue A possible example of a run of your program is as follows Would you like to sort the results by x.500id or final grade (enter x or g)?: x kumar010 liux0006 olson038 90 85 85 95 92 90 80 90 100 85 95 95 90 93 85 89.4 89 91.6 Would you like to continue (enter y or Y): y Would you like to sort the results by x.500id or final grade (enter x or g)?: h Error: please enter x for x.500id or g for final grade Would you like to sort the results by x.500id or final grade (enter x or g)?: g
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
