FileDocCategorySizeDatePackage
Square.javaAPI DocExample309Fri Nov 09 18:51:26 GMT 2001polymorphism

Square.java

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);
	}
}