示例#1
0
        static void Main(string[] args)
        {
            Director director = new Director();

            Builder chBuilder = new ChineseBuilder();
            Builder roBuilder = new RomanBuilder();

            director.Building(chBuilder);
            House chHouse = chBuilder.GetHouse();

            Console.WriteLine(chHouse.Door);
            Console.WriteLine(chHouse.Wall);
            Console.WriteLine(chHouse.Windows);

            Console.WriteLine("-------------------------");

            director.Building(roBuilder);
            House roHouse = roBuilder.GetHouse();

            Console.WriteLine(roHouse.Door);
            Console.WriteLine(roHouse.Wall);
            Console.WriteLine(roHouse.Windows);

            Console.WriteLine("-----------end-----------");
            Console.ReadKey();
        }