Beispiel #1
0
        static void Demo3()
        {
            Animal animal1 = new Cat();

            animal1.Sound();
            animal1.Move();
            Animal animal2 = new Fish();

            animal2.Sound();
            animal2.Move();
            Animal animal3 = new Shake();

            animal3.Sound();
            animal3.Move();
        }