Completing homework Java: Loops-Methods-Classes