CMPT474 Assignment 4