Completed Programming 2 Assignment

This file contains the required code with comments.