class Shape { public void draw() { System.out.println("Drawing a shape"); } } class Circle extends Shape { @Override public void draw() { System.out.println("Drawing a circle"); } } class Rectangle extends Shape { @Override public void draw() { System.out.println("Drawing a rectangle"); } } public class ShapeDemo { public static void drawShape(Shape s) { s.draw(); } public static void main(String[] args) { Shape shape = new Shape(); Circle circle = new Circle(); Rectangle rectangle = new Rectangle(); System.out.println("Testing Shape:"); drawShape(shape); System.out.println("\nTesting Circle:"); drawShape(circle); System.out.println("\nTesting Rectangle:"); drawShape(rectangle); } }