예제 #1
0
        static void Main(string[] args)
        {
            // use of violation door
            DIP_DoorViolation myDipDoorViolation = new DIP_DoorViolation();
            myDipDoorViolation.Open();

            // use of solution door
            IDoor myDoor = new MechanicalDoor();
            DIP_DoorSolution myDipDoorSolution = new DIP_DoorSolution(myDoor);
            myDipDoorSolution.Open();
        }
예제 #2
0
        static void Main(string[] args)
        {
            // use of violation door
            DIP_DoorViolation myDipDoorViolation = new DIP_DoorViolation();

            myDipDoorViolation.Open();

            // use of solution door
            IDoor            myDoor            = new MechanicalDoor();
            DIP_DoorSolution myDipDoorSolution = new DIP_DoorSolution(myDoor);

            myDipDoorSolution.Open();
        }