package polymorphism;
import javax.swing.*;
import java.awt.*;
public class Square extends Shape {
// An abstract class which extends Object (i.e. has drawing methods)
public void drawShape(Graphics g, int x, int y, int width, int height) {
// Draw the circle
g.drawRect(x,y,width,height);
}
} |