This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
This is quoted from Ganesh and Sharma book page 89:
Now let's discuss another scenario where a common functionality needs to be supported by all the shape objects.
For instance, each object could be drawn inside another shape object, which means each shape object has a parent
(i.e., containing) object. As pointed out earlier, abstract classes are the best place to put a common functionality.
But how child classes can use the getter and setter of the parentShape, parentShape is defined as private in the base class, which makes it not accessible by other classes.