Solution for programming assignment 2 complete

- program code adapted
- program code commented