This is homework of Java programming lesson