Java lopps, methods and classes homework