COMP90014 Assignment 2 code.