package capitulo05.bloque03.animales;

public class Principal {
    public static void main(String[] args) {
        Animal[] animales = new Animal[10];
        for (int i = 0; i < animales.length; i++) {
            if (Math.round(Math.random()) == 1) {
                animales[i] = new Gato();
            } else {
                animales[i] = new Perro();
            }
        }

        for (Animal animal : animales) {
            animal.emitirSonido();
        }
    }
}
