Consider the definition of the following class:
class testClass
{
public:
int sum();
//Returns the sum of the private member variables
void print() const;
//Prints the values of the private member variables
testClass();
//Default constructor
//Initializes the private member variables to 0
testClass(int a, int b);
//Constructors with parameters
//initializes the private member variables to the values
//specified by the parameters
//Postcondition: x = a; y = b;
private:
int x;
int y;
};
a. Write the definitions of the member functions as described in the definition of the class testClass.
b. Write a test program to test the various operations of the class testClass.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.