Foy - Programming Assignment 2

Added code for the programming assignment 2 as described in the course
material.