CounterLogger Class
class CounterLogger implements CounterObserver {
public CounterLogger(Counter ctr, String counterName) {
this.counterName = counterName;
ctr.registerAsObserver(this); // Observes counter
public void counterHasChanged(Counter ctr) {
System.out.println(counterName + " changed to " +
private String counterName; // For id purposes