Example 2:

The JRobo class is modified by adding a rect drawing method to it. The new functionality is demonstrated with two JRobo instances.