My final Programming Assignment 2 solution