added examples 1 to 4
since the mousePressed function seems not to be working, using keyPressed instead in example 4
added examples 5 to 7
Merge pull request #4 from luisaph/master

Added chapter 4 examples (#1 to #7)