compsci 340 assignment 1