Poly homework for computer science class