My solution of the programming assignment.