Completed Programming Assignment2