Solution for the magic zoo problem as described in Java Magazine for December 2014.