Question
Im learning c++ and i could really use some help with this problem. thank you. Student Grade Statics Use functions to determine the number of
Im learning c++ and i could really use some help with this problem. thank you.
Student Grade Statics
Use functions to determine the number of letter grades from a given list of students number grades. The requirements are
1) Initialize the variables, countGradeA, countGradeB, countGradeC, countGradeD, countGradeF to 0.
2) Validate the input data for the number of students in the class. Display error message if necessary.
3) Read a number grade. If the number grade is in between 100-90, for example, then increment the countGradeA count and so on and so forth for all other grades. Letter grades are determined by the following
90 100 A
80-89 B
70-79 C
60-69 D
0-59 F
4) Repeat Steps 2 and 3 for each number in the list.
5) Print out the results which shows the counts for each grade.
The following functions should be defined/implemented and called in main()
int getNumberOfStudents(); //make sure to validate number of students
void Initialize(int& countGradeA, int& countGradeB, int& countGradeC, int& countGradeD, int& countGradeF);
void getNumberGrade(int& grade); //make sure to valid the grade.
void classifyGrades (int grade, int& countGradeA, int& countGradeB, int& countGradeC, int& countGradeD, int& countGradeF);
void printResults(int countGradeA, int countGradeB, int countGradeC, int countGradeD, int countGradeF);
Example Output:
GRADE STATICS
-----------------------------------
Please enter number of Students: -2
Invalid input. Please re-enter.
Please enter number of Students: 5
Please enter a number of grade between 0 and 100: 95
Please enter a number of grade between 0 and 100: 74
Please enter a number of grade between 0 and 100: 88
Please enter a number of grade between 0 and 100: 199
Invalid grade! Please re-enter.
Please enter a number of grade between 0 and 100: 65
Please enter a number of grade between 0 and 100: 57
Enter a student grade: 94
Enter a student grade: 61
Enter a student grade: 75
GRADES NUMBER OF STUDENTS
------ ------------------
A 1
B 1
C 1
D 1
F 1
PROGRAM ENDING. GOOD BYE!
-----------------------------------
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