Beispiel #1
0
        static void Main()
        {
            IShape square    = new Square();
            IShape rectangle = new Rectangle();
            var    editor    = new GraphicEditor();

            Console.WriteLine(editor.Draw(square));
            Console.WriteLine(editor.Draw(rectangle));
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Square    square    = new Square();
            Circle    circle    = new Circle();
            Rectangle rectangle = new Rectangle();

            square.Draw();
            circle.Draw();
            rectangle.Draw();

            GraphicEditor graphicEditor = new GraphicEditor();

            graphicEditor.DrawShape(circle);
        }