Question: Write a C++ program that reads the student's name and scores from the attached data file students.txt and store them in an array

Write a C++ program that reads the student's name and scores from the attached data file "students.txt" and store them in an array of Student struct objects, then calculate and display each student's final grade based on the following criteria: midt-erm test is counted for 25% of the final grade, final test is counted for 25% of the final grade and average of 4 labs is counted for 50% of the final grade.

The format of the attached data file "students.txt" is ---

//student name

// midte-rm test score, final test score

// lab1 score, lab2 score, lab3 score, lab4 score

a broader description is in the link below (I have already written a part of the code, but I have some doubts with the rest, I've added some comments too)

https://drive.google.com/drive/folders/1lRYjYOKmrSFR7WjSMhQfq1O49z8YAP9m?usp=sharing

students.txt

Joe Doe 90.8 89.5 67 89.2 99.0 100.0 Susan F. Smith 95.5 94.0 78.5 90 87.5 57 Sam Grover 78 100.0 79.5 69.4 90.0 88.5 Diane C. Phelps 100 78.0 56.0 69 94.0 78 John Franklin 65 87.0 67.0 96 49.0 87 Derrick Myers 89.8 98.5 76 89.2 93.0 100.0

expected output:

Joe Doe's final grade is 89.475% (grade: B )

Susan F. Smith's final grade is 86.5% (grade: B )

Sam Grover's final grade is 85.425% (grade: B )

Diane C, Phelp's final grade is 81.625% (grade: B)

John Franklin's final grade is 75.375% (grade: C)

Derrick Myers's final grade is 91.85% (grade: A)

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 Databases Questions!