Solution Programming Assignment 2