Implemented code for Chapter 06.