Reference no: EM132293466
Assignment: In-Class Activity
For your in-class activity this week, I want you to write a C++ program that will utilize parallel arrays. One of the arrays will be an array of strings and the other an array of int. The strings array will be the names of students, and the int array will be the corresponding final average in a course. Assume the data file grades.txt will contain 10 names and 10 integers. This is what is in grades.txt:
Ava 91
Bob 89
Cam 81
Dan 98
Eve 85
Fay 68
Guy 77
Hal 70
Ivy 75
Jay 65
Step 1: Create the arrays. Do not create global variables of ANY kind! The next figure shows the declarations and main function of my version of the program.
Step 2: Create a function named FillArrays and pass the arrays into the function through the parameter list (See line 16 in Figure A). Open grades.txt in this function and read the data from the file.
Step 3: In a second function named DisplayGrades, display the name, numeric score, and letter grade for each student. You will need to pass both arrays into this function (See line 17 in Figure A). Use the standard 10-point scale for the letter grade. Notice from grades.txt everyone passed, but include the "F" possibility in case I want to change up the grades.txt file I use to grade the assignment.
Note - Figures are in attached file.
Attachment:- Assignment Files.rar