public class Circle extends Shape {
private int x, y, radius;
public Circle(int x, int y, int radius, Color color) {
super(color);
this.x = x;
this.y = y;
this.radius = radius;
}
@Override
public void draw() {
System.out.println("Drawing Circle [" + color.getColor() + "] at (" + x + "," + y + ") with radius " + radius);
}
}
public class Square extends Shape {
private int x, y, side;
public Square(int x, int y, int side, Color color) {
super(color);
this.x = x;
this.y = y;
this.side = side;
}
@Override
public void draw() {
System.out.println("Drawing Square [" + color.getColor() + "] at (" + x + "," + y + ") with side " + side);
}
}