Question: in c + + You are given a file containing students' quiz scores. The file is formatted as follows: where each row comprises a student's

in c++ You are given a file containing students' quiz scores. The file is formatted as follows:
where each row comprises a student's ubitname and a quiz score. Note that there are multiple lines associated with each student. Each of
these lines represents a separate quiz grade earned by that student.
Write a program that reads in the quiz grades, calculates the sum score obtained by each student, and then writes this information back to
a file. Implement your program using the following steps:
Prompt the user for the name of the file that contains the students' quiz scores. Use the prompt: Input filename:
Open the file with read permissions. If the file fails to open, then print File not open. and return.
Create a vector to store the ubitnames and a vector to store the sum score obtained by each student
Store the first row of values from the file in the ubitname and score vectors
5. Read in the next row of values from the file
Check to see if the new ubitname already exists in the ubitname vector
If the ubitname already exists, sum scores together in the score vector
Else, add a new entry into the ubitname and score vectors
Repeat steps 5 and 6 until the file ends
Close file
Prompt the user for an output filename. Use the prompt: Output filename:
Open the file with write permissions.
Print out results to the output file in the following format:
in c + + You are given a file containing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!