示例#1
0
        static void Main(string[] args)
        {
            //Without facade
            Doors door = new Doors();
            Windows window = new Windows();
            Almirah almirah = new Almirah();
            //can have many more objects to lock the house...

            door.LockDoors();
            window.CloseWindows();
            almirah.LockAmirah();

            Console.WriteLine("-----------------------");
            //With Facade
            HouseFacade house = new HouseFacade();
            house.LockHosue();
        }
 public HouseFacade()
 {
     door01 = new Doors();
     window01 = new Windows();
     almirah01 = new Almirah();
 }