This is Programming Assignment 2.