The new version of addPoint(...) defined in the Octagon class belongs in all subclasses of Polygon |
It would be unwise to do so, however (why?) |
Thus, in the next example (Hexagon), we define a subclass of Polygon called MyPolygon, which itself is subclassed by the Hexagon class |