Consider the following class specification below. Write the implementation of th
ID: 3545195 • Letter: C
Question
Consider the following class specification below. Write the implementation of the default class constructor. The default class constructor initializes stduentName to "unknown", numTestScores to 0 and testScores to NULL.
#include <string>
using namespace std;
class StudentTestScores{
private:
string studentName;
float *testScores; // used to point to an array of test scores
int numTestScores; // number of test scores
public:
// Class default constructor
// Class copy constructor
// Class destructor
// Overloaded assignment opertaor. Allows deep copying of one instance of the class to another.
//class accessors
//class mutators
// other functions
};
Explanation / Answer
StudentTestScores(){
stduentName = "unknown";
numTestScores = 0;
testScores = NULL;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.