Head first design patterns example code for ref.