Source code for chapter 04

All the source code for chapter 4