Answer:
see explaination
Step-by-step explanation:
public class Counter
{ int counter,limit;
static int nCounters = 0;
Counter(int a,int b)
{ counter=a; limit=b;
nCounters++;
}
void increment()
{ if(counter<limit)
counter++;
}
void decrement()
{ if(counter>0)
counter--;
}
private int getValue()
{ return counter;
}
private static int getNCounters()
{ return nCounters;
}
}