Design Pattern in Java: Observer