Example #1
0
        public void SpawnAnimals()
        {
            abstractFactory = FactoryProducer.GetFactory(FactoryType.Animal);

            IAnimal cat;
            IAnimal dog;

            cat = abstractFactory.GetAnimal(AnimalType.Cat);
            dog = abstractFactory.GetAnimal(AnimalType.Dog);

            cat.Voice();
            dog.Voice();
        }