Question: C++ Create a class called Class Quiz. Class Quiz will maintain quiz grades for students in a class. The class has the following member variables:

C++ C++ Create a class called Class Quiz. Class Quiz will maintain

Create a class called Class Quiz. Class Quiz 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 constructor // sets numStudents =0; and grades = nullptr; +parameterized constructor // accepts numStudents and creates an array with size = numStudents; +AcceptGrades // accept grades from end user using cin and stores them in grades array. +Calculate Average // 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: 1. Create an object of the Class Quiz class. 2. Call AcceptGrades to accept grades from user. 3. Call Calculate Average to calculate the average of the class 4. Print the class average

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!