chapter 2:object pattern