Basic HTML version of Foils prepared 13 July 98

Foil 57 A Subclass of Polygon

From Java Academy II:Intermediate Java NPAC/ECS Java Academy -- February to April 98. by Tom Scavo

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

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998