Question: Write a C + + program to read student exam data from the provided grade _ data.txt file, calculate average scores, assign letter grades, and
Write a C program to read student exam data from the provided gradedata.txt file,
calculate average scores, assign letter grades, and output the results to a formatted file.
Requirements:
Input:
Read student ID and exam scores from the provided gradedata.txt file.
Calculations:
Calculate the average score for each student and store in vector
Assign a letter grade based on the average score using the following
criteria:
A:
B:
C:
D:
F:
Output:
Output a formatted table to a file named results.txt
The table should have the following format:
OOP Approach:
Use an extemal class to encapsulate the data and functions related to
student information, calculations, and output.
Four UserDefined Functions:
Read Data from File: Reads student ID and exam scores from the file into
appropriate vectors.
Calculate Averages: Calculates the average score for each student.
Assign Grades: Assigns letter grades based on the average scores.
Format and Output Table: Formats the output table and writes it to the file
results.txt
Please use as simple of code for C in code blocks. The input file is the last image
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
