Design Pattern Leaning from Head First cookbook