Add a new class named ScoreReport that contains an array of floats. Each float r
ID: 3539996 • Letter: A
Question
Add a new class named ScoreReport that contains an array of floats. Each float
represents a homework score. And it has another data member that is the number of
homeworks. Define default contructor, copy constructor, constructor with parameters
and destructor. And also override the Display() method.
2. Create an array of Document pointers, allocating new Report, GradeReport, and
ScoreReport objects. Display each one, and then delete them from memory. Which
destructors were called? Add a destructor to Document that outputs the debug
information to be sure.
3. Make Document%u2019s destructor virtual, and run the same code you wrote in the step 2, Now which destructor are called?.
Explanation / Answer
g
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.