Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions