Exploration of design pattern: Observer