예제 #1
0
        static void Main(string[] args)
        {
            var animal = new Animal();
            var walk   = new Walkable();

            var human = new Human(animal, walk);

            human.HumanActivity("John");

            var humanNew = new Human(animal, walk);

            humanNew.HumanActivity("Alice");
        }
예제 #2
0
 public Human(Animal animal, Walkable walkable)
 {
     _animal   = animal;
     _walkable = walkable;
 }