Programming assignment 2

My solution