Write down the definition of the class counter consisting of:
a) An instance variable named counter of type int.
b) A constructor which takes one int argument and allocates its value to the counter.
c) A method named increment which adds one to counter. It does not take parameters or return a value.
d) A method named decrement which subtracts one from the counter. It also does not take the parameters or return a value.
e) A method named getValue which returns the value of instance variable counter.