3,4 SDT task in Java / IntelliJ IDEA (final)