Chapter 6 Final Source Code (Fully Working Sample)