public class Rectangle extends Shape{
Rectangle(Double w, Double h)
{
super(dim -> dim[0] > 0 && dim[1] > 0, dim -> dim[0] * 2 + dim[1] * 2 ,dim -> dim[0] * dim[1],new Double[]{w, h});
}
static void DrawRectangle( )
{
final String asterisk = "*";
for(int i = 0; i <= w; i++)
{
for(int j = 0; j <= h; j++)
{
System.out.print(asterisk);
}
System.out.println();
}
}
}