class Polygon (slide 3 of 3)
public double volume() { return 0.0; }
public int nVertices() { return vertices.size(); }
public int nFaces() { return 1; }
public void paint(Graphics g) {
Enumeration enum = vertices.elements();
Point firstVertex = (Point) enum.nextElement();
Point lastVertex = firstVertex;
while(enum.hasMoreElements()) {
Point thisVertex = (Point) enum.nextElement();
g.drawLine(lastVertex.x, lastVertex.y ,
thisVertex.x, thisVertex.y);
g.drawLine(lastVertex.x, lastVertex.y,
firstVertex.x, firstVertex.y);