Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Problem: Program to compute, sort, and display student grades for a course Problem B) (20 Points) Program to compute, sort, and display student grades
C++ Problem: Program to compute, sort, and display student grades for a course
Problem B) (20 Points) Program to compute, sort, and display student grades for a course 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: Gradestxt" (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 01son38 95 95 9 93 85 kumar@1 9 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 (in memory, no need to write back to file) the following data for each of them 01son38 95 95 9 93 85 91.6 kumar@1 9 85 85 95 92 89.4 (So Ilux6 has a Final Average of 89. , olson038 has a Final Average of 91. 6, and kumar01 has a final average of 89.4) After doing this, your program should enter a continuation loop that: Prompts the user if they would like to sort the results by X.500 id or final grade, and 2. 1. obtains the user's response 3. sorts the data according to the user's response; 4. displays the results to the console; 5. 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 89.4 89 90 85 85 95 92 liux0006Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started