CS2112 Assignment 4