Java magazine 2014-03 code challenge