homeworks from Java training