|
|
@ -8,12 +8,7 @@ public class AnimalMain {
|
|
|
|
private static void displayAnimals() {
|
|
|
|
private static void displayAnimals() {
|
|
|
|
|
|
|
|
|
|
|
|
// Creating an array of animal objects
|
|
|
|
// Creating an array of animal objects
|
|
|
|
AnimalHelper helper = new AnimalHelper(new Animal[] {
|
|
|
|
AnimalHelper helper = new AnimalHelper(new Animal[] { new Cow(), new Cat(), new Dog(), new Horse() });
|
|
|
|
new Cow(),
|
|
|
|
|
|
|
|
new Cat(),
|
|
|
|
|
|
|
|
new Dog(),
|
|
|
|
|
|
|
|
new Horse()
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Displaying information about the animals
|
|
|
|
// Displaying information about the animals
|
|
|
|
helper.displayInformation();
|
|
|
|
helper.displayInformation();
|
|
|
|