package com.gritzer.util.math;

public class Square extends Polygon {

  public Square(float length) {
    super();
    setxPoints(new float[] {0f, length, length, 0f});
    setYPoints(new float[] {0f, 0f, length, length});
    setColor(Colors.random());
    w = (int) length;
    h = (int) length;
  }

}

@@ -59,15 +59,17 @@
 nds 
-Polygon
+Rectangle
  %7B%0D%0A
@@ -117,197 +117,23 @@
 per(
-);%0D%0A    setxPoints(new float%5B%5D %7B0f, length, length, 0f%7D);%0D%0A    setYPoints(new float%5B%5D %7B0f, 0f, length, length%7D);%0D%0A    setColor(Colors.random());%0D%0A    w = (int) length;%0D%0A    h = (int) length
+length, length)
 ;%0D%0A 

Sq is Rect