Given the class definition below:
class Counter
{
public:
Counter(); //initializesthe counter value to 0.
Counter(int new_val); // value is set according tothe
//incoming argument.
void increment(); //increment counter value by1.
int get_value(); //returns the value ofmember
//variable
private:
int value;
};
1. Write the definition for the defaultconstructor.
2. Write the definition for the constructor with oneargument.
3. Write the definition for the accessor function.
4. Write the definition for the increment function
5. Write a short program (main function) to do the following.Create Counter object with a value you choose (hint: use theconstructor with one argument. Also look atBankAccountclass on pg571-573) If the value is less than 10increment the value
by 1. Print the original value and the incrementedvalue.
Expert
OR
PayPal Gateway not configured
OR
PayPal Gateway not configured
PayPal Gateway not configured
PayPal Gateway not configured