Program assignment 2

Added code for assignment 2.