Example #1
0
        public House ConstructHouse(HouseBuilder builder)
        {
            House house = builder.CreateHouse();

            Console.WriteLine(house.GetRepresentation());

            house.SetFloor(builder.CreateFloor());
            Console.WriteLine(house.GetFloor().GetRepresentation());

            house.SetWalls(builder.CreateWalls());
            Console.WriteLine(house.GetWalls().GetRepresentation());

            house.SetRoof(builder.CreateRoof());
            Console.WriteLine(house.GetRoof().GetRepresentation());

            return(house);
        }