Solved

Write a Destructor for the Following Class

Question 9

Essay

Write a destructor for the following class:
class Classroom
{
private:
string *student;
int numStudents;
int gradeLevel;
public:
Classroom();
~Classroom();
void display();
};
Classroom::Classroom()
{
int x;
cout > gradeLevel;
cout > numStudents;
student = new string[numStudents];
for(x = 0; x > student[x];
}
}

Correct Answer:

verifed

Verified

Classroom::~Classroo...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions