@Data
public class Circle extends Shape {
int radius;
public static Circle of(int radius) {
Circle circle = new Circle();
circle.setRadius(radius);
return circle;
}
@Data
public class Rectangle extends Shape {
private int w;
private int h;
public static Rectangle of(int w, int h) {
Rectangle rectangle = new Rectangle();
rectangle.setW(w);
rectangle.setH(h);
return rectangle;