Question
need help making this program in c++ Define a class named tGradeType to keep track of the three test grades (whole numbers) that a student
need help making this program in c++
Define a class named tGradeType to keep track of the three test grades (whole numbers) that a student can get in a semester according to the following rules: Data member (instance variable): 1) An int array named tgrades size 3: stores the three test grades Member functions (methods): 1) getGrades(first, second, final): returns the three tests grades stored in tgrades array. 2) setGrades(first, second, final): stores the tests grades in tgrades array. 3) avgGrade(): returns the average of the three tests as a whole number. 4) default constructor: initializes all test grades to 0. 5) parameterized constructor: initializes all test grades to the values specified by the client program. Client program: 1) Keep track of 4 students' test grades. 2) Initialize the grades of the first two students to 0,0,0 and the grades of the next two to 70,95, and 100 3) Show the average test grade for each student 4) Change the grades of the first two to any values that you like (0..100) 5) Show their new average Feel free to add more members (data and/or functions) to the class if you like (for example full name, comparison of average grades, etc.) and/or more methods calls in the client program.
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