Homework 3 and 4

Previously it was the 120th pull request. It was closed, because of creating new branch for this homeworks instead of developing on trunk (master).