Homework for Mr.K's APCS class.