Eight assignment from "Introducing Java"