Implement Programming Assignment 2