Question: ** C++ must be used. ensure prototypes are used by the main function ** Write a Gradebook program with the following functionality. Reads in from
** C++ must be used. ensure prototypes are used by the main function **
Write a Gradebook program with the following functionality.
Reads in from the keyboard the input for four students
Full Name
Student ID - a 7 digit number (no need to validate for exactly 7 digits, use an int)
Scores[5] - an array holding five test scores
Drop the high score and the low score. Average the remaining scores
Assign a letter grade based on the average score for the student
Calculate the class average based on each student's 3 middle scores (the average of the student averages).
Display in a table format each students' name, five test scores, average, and letter grade
Display the class average
BONUS (5 points): Find the student with the highest average and display that student's name, ID, and average
BONUS (5 points): Read in the data from an input file and include the .txt file with your submission
Design your solution to use structs, functions, arrays, and only 2 global constants.
Helpful Hints:
You may use NUM_STUDENTS = 4 and NUM_TESTS = 5 for global constants
Create a Student struct with the following members
name
ID
scores[NUM_TESTS]
average
grade
Add the Student struct to global space (not in a header file)
Create an array of structs (one element for each student),
for example, Student CIS5[NUM_STUDENTS]
When utilizing a nested loop with an array of structs and a member array, be careful how you use the subscriptsfor example, the syntax for identifying a specific test for a specific student looks like this
CIS5[i].scores[j] // use dot notation to access member data in a struct
where i is the subscript for the specific student and j is the subscript for the specific test
Use good design, good style, and efficient logic (no brute force logic)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
