Пример #1
0
        static void Main()
        {
            var door = DoorFactory.MakeDoor(80, 30);

            Console.WriteLine($"Height of Door: {door.GetHeight()}");
            Console.WriteLine($"Width of Door: {door.GetWidth()}");
        }
        static void Main(string[] args)
        {
            DoorFactory doorFactory = new DoorFactory();
            IDoor       door        = doorFactory.CreateDoor(100, 200);

            Console.WriteLine($"Ширина - {door.GetWidth()},  Высота - {door.GetHeight()}");
            Console.ReadKey();
        }
Пример #3
0
        static void Main(string[] args)
        {
            var doorFactory = new DoorFactory();
            var door        = doorFactory.MakeDoor(100, 100);

            door.PrintDoorParams();
            var door2 = doorFactory.MakeDoor(200, 200);

            door2.PrintDoorParams();

            Console.Write("\nPress a key to Exit...");
            Console.ReadKey();
        }
Пример #4
0
        static void Main(string[] args)
        {
            var door = DoorFactory.MakeDoor(100, 200);

            Console.WriteLine($"{door.GetWidth()}  {door.GetHeight()}");
        }