Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C++ PLEASE Problem B) (20 Points) Program to compute, sort, and display student grades for a course Information processing such as computing averages, sorting

image text in transcribed

image text in transcribed

IN C++ PLEASE

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: olson@38 95 95 9 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 (in memory, no need to write back to file) the following data for each of them: 11ux6 90 8 9 100 85 89 olson038 95 95 9 93 85 91.6 kumar@1 90 85 85 95 92 89.4 (So liuxo006 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: 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 kumar@10 9 85 85 95 92 89.4 89 liux0006

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions