Tim Cooke wrote:Did you work through the puzzle yourself? Or did you just jump to the answer?
If I were working through this problem I would work backwards and start with the System.out.println() method in main. I'd think about what statements would go into the sys out to achieve the required output format. Then work out how the data values get there, which leads to working out what classes are required and where.
Specifically which part don't you understand?