Java homework for 2014.autumn