Seventh assignment from "Introducing Java"