Finished Book Code

The final code from Chapter 8 of the book.