add sample code for chapter7.
Merge commit 'd405002915c145614a2518beed10f89c2e500c68'
Merge pull request #62 from Ivenyang/master

fixed #3305, add chapter7 sample code.