COMP 346 Programming Assignment 2