1 | There are two Rectangle constructors |
2 | The first constructor is straightforward: public Rectangle( int x, int y, int w, int h ) { super(); // a constructor of the superclass this.addPoint( x, y ); this.addPoint( x + w, y ); this.addPoint( x + w, y + h ); this.addPoint( x, y + h ); } |