Пример #1
0
        static void Main(string[] args)
        {
            // 创建一个奔驰车的车轮和车窗
            ICreateProduct l_createBenzProduct = new CreateBnezProduct();
            IWindow        l_benzWindow        = l_createBenzProduct.CreateWindow();
            IWheel         l_benzWeel          = l_createBenzProduct.CreateWheel();

            l_benzWeel.Wheel();
            l_benzWindow.Window();

            // 创建一个宝马车的车轮
            IWheel l_bmwWheel = new CreateBmwProduct().CreateWheel();

            l_bmwWheel.Wheel();
            Console.ReadKey();
        }