programs/code from Java II class