added source code for assignments of chapter 7