Homework for basics in java loops methods and classes