Reference no: EM132298313
Assignment -
For your in-class activity, change the program we did for Module 14. This time instead of parallel arrays, we're going to have an array of struct. Within the struct type (I named mine StudentRec), you will have three members:
1. A name of type string
2. A score of type int
3. A grade of type char
You'll create an array of 10 StudentRecs. Assume the same data file. 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 NEW program.
Figure A: My Declarations and main function
Step 2: Create a function named FillArrays and pass the struct array into the function through the parameter list (See line 24 in Figure A). Open grades.txt in this function and read the data from the file.
Step 3: Create a function named GetGrades and pass the struct array into this function through the parameter list (See line 25 in Figure A). This function will call the function CalcGrade by passing an individual score into the GetGrades function. GetGrades will return the letter grade earned by the student based upon the score passed into the function.
Step 3: In a third function named DisplayGrades, display the name, numeric score, and letter grade for each student. You will need to pass the StudentRec array into this function (See line 26 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 - If this could be created in Visual Studio that would be perfect. This assignment builds upon last week's, which attached for reference.
Attachment:- Assignment Files.rar