Exemple #1
0
        static void Main(string[] args)
        {
            Creator creator = new CircleCreator();
            Shape   shape1  = creator.create_shape();

            creator = new SquareCreator();
            Shape shape2 = creator.create_shape();

            creator = new RectangleCreator();
            Shape shape3 = creator.create_shape();
        }