Java IFMO homework 2013-2014.