Question
Help with C++ please Create a class called ClassQuiz. ClassQuiz will maintain quiz grades for students in a class. The class has the following member
Help with C++ please
Create a class called ClassQuiz. ClassQuiz will maintain quiz grades for students in a class.
The class has the following member variables: int numStudents // holds the number of students in the class double* grades // to point to a dynamically allocated array of grades
The class has the following public functions: +default constructors //set numStudents = 0; and grades = nullptr; +parameterized constructors //accepts numStudents and creates an array with size = numStudents; +AcceptGrades // accept grades from end user using cin and stores them in grades array. +CalculateAverage //calculate and returns the average of the class. +Destructor to free the dynamically allocated array. +Any setters/getters needed. Note that a setter for the numStudents should also initialize grades array.
Main: Create an object of the ClassQuiz class. Call AcceptGrades to accept grades from user. Call CalculateAverage to calculate the average of the class. Print the class average.
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