Programming assignment 2.