DrawablePolygon Constructor #4
The constructor for regular n-gons follows: public DrawablePolygon( int x, int y, int r, int n ) { this(); // invoke constructor #1 double theta = 2*Math.PI/n; DrawablePoint p = new DrawablePoint( 0, -r ); // rotate and add as in the previous foil… this.translate( x, y ); }