Question
Create 4 arrays: a 1-D array to store the students id, 1-D array to store the students names, a parallel 2-D array to store the
Create 4 arrays: a 1-D array to store the students id, 1-D array to store the students names, a parallel 2-D array to store the test scores, and a parallel 1-D array to store letter grades. Read data into the 3 arrays from the file data121.txt. If the file is not found, the program needs to terminate with this error, Data file not found. Calculate and store a letter grade into a 1-D array based on the total score, sum up all scores for each student, for example if the total score is 82, then the grade is a B. Score Letter grade 90 ~ 100 A 80 ~ 89 B 70 ~ 79 C 60 ~ 70 D 0 ~ 60 F Once the data has been read into the arrays, implement the following 3 steps. Display all students names, scores, and their grades, Calculate and display a student name that received overall maximum points, Calculate and display the average of all elements in the array test scores, Generate a new text file report121.txt and save students names and grades.
data.121.txt;(id numbers on the left)
3450, Guido VanRossum, 10, 15, 14, 18, 20 6120, Yukihiro Matsumoto, 10, 9, 13, 12, 14 9230, James Gosling, 10, 16, 13, 12, 10 2340, Dennis Ritchie, 11, 15, 14, 18, 11 3180, Kathleen Booth, 9, 11, 14, 18, 12 7800, Bjarne Stroustrup, 18, 20, 20, 19, 20 5410, Rasmus Lerdorf, 10, 12, 14, 18, 20 1590, Larry Wall, 12, 15, 14, 16, 8 2170, Brendan Eich, 20, 15, 14, 18, 20 6530, Ada Lovelace, 10, 5, 14, 8, 10
Using C++ language
Step 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