Write a complete definition of class called counter that counts 0, 1, 2, 3, 4, .... etc with one private instance variab
Posted: Wed Apr 27, 2022 3:46 pm
Write a complete definition of class called counter that counts 0, 1, 2, 3, 4, .... etc with one private instance variable representing the value of the counter and two instance methods: increment() that adds one to the counter value, and getValue() that returns the current counter value. (5 Marks)