Esempio n. 1
0
        static void TestFactory()
        {
            Console.WriteLine("Factory Test.......");
            ToolFactory toolFactory = new BrushFactory();

            Tool tool = toolFactory.GetTool();

            tool.Draw();

            toolFactory = new PencilFactory();

            tool = toolFactory.GetTool();
            tool.Draw();
        }