Java Genesis

Hints for Chapter 2: Exploring Java

Problem 11: constructing a hollow square


Here is a suggested strategy. If the centre of the square is at position (196, 134) and the square has width 100, then the position of the upper-left corner of the square will be (196-50, 134-50). So what we need to do is
Try this before looking at the next (and last) hint.


Next Hint