Question
Need this completed in C++ language only using functions. Project 2 Using Functions (6 pts) Student Grade Statics Define and use functions to determine the
Need this completed in C++ language only using functions.
Project 2 Using Functions (6 pts) Student Grade Statics Define and 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 if the input data is an integer number. In other words, if any non-digit character or a non-integer number is entered, the program will print out an error message and prompt to re-enter the number. 3) Read in the number of students. Validate the input data for the number of students in the class by calling the function defined in 2). 4) Read a number grade. Validate the input data for the number grade by calling the function defined in 2). Validate if the grade falls in the range of 0-100. 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 5) Repeat Steps 2 and 3 for each number in the list. 6) 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 int getValidIntegerInput(string msg); // validate input data void Initialize(int& countGradeA, int& countGradeB, int& countGradeC, int& countGradeD, int& countGradeF); //initialize all the grades Project 2 Page 2 of 3 ET575 Introduction to C++ Programming Design and Implementation S. Trowbridge & J. Sun 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: Example Output: Project 2 Page 3 of 3 ET575 Introduction to C++ Programming Design and Implementation
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