Finishing programming assignment 2.