This is my code for the Porgramming Assignment 2.