(Solved):Define a class called Counter. An object of this class is used to count things. So it records a count that is a nonnegative whole number. Include methods to set the counter to 0, to increase the co… View Answer…

 

Question

Define a class called Counter. An object of this class is used to count things. So it records a count that is a non-negative whole number.

Include methods to set the counter to 0, to increase the count by a number passed in via a variable, and to decrease the count by a number passed in via a variable. Be sure that no method allows the value of the counter to

Scroll to top