001package factory.shape4;
002import java.awt.Graphics;
003public interface Shape {
004        void paint(Graphics g);
005}
006class Ellipse implements Shape {
007        Ellipse(int radius1, int radius2) { /* ... */ }
008        public void paint(Graphics g) { /* ... */ }
009        // ...
010}
011class Rectangle implements Shape {
012        Rectangle(int height, int width) { /* ... */ }
013        public void paint(Graphics g) { /* ... */ }
014        // ...
015}