Question: Define a class countertype to implement a counter. Your class must have a private data member counter of type int and functions to set counter
Define a class countertype to implement a counter. Your class must have a private data member counter of type int and functions to set counter to the value specified by the user, initialize counter to 0, retrieve the value of counter, and increment and decrement counter by one. The value of counter must be nonnegative.
There are 3 file names in this assignment. counterType.h
counterTypeImp.cpp
main.cpp
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
