Code Examples for Chapter 6