Resolution of Prog Assignment2

Code commented and tested