Chapter 3 Final Source Code (Fully Working Sample)