001package factory.shape3;
002import java.awt.Graphics;
003public interface Shape {
004        void paint(Graphics g);
005}
006class Ellipse implements Shape {
007        public void paint(Graphics g) { /* ... */ }
008        // ...
009}
010class Rectangle implements Shape {
011        public void paint(Graphics g) { /* ... */ }
012        // ...
013}