You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
456 B
Java
18 lines
456 B
Java
package src;
|
|
|
|
public class AnimalMain {
|
|
public static void main(String[] args) {
|
|
displayAnimals();
|
|
}
|
|
|
|
private static void displayAnimals() {
|
|
|
|
// Creating an array of animal objects
|
|
AnimalHelper helper = new AnimalHelper(new Animal[] { new Cow(), new Cat(), new Dog(), new Horse() });
|
|
|
|
// Displaying information about the animals
|
|
helper.displayInformation();
|
|
helper.displayAveragePrice();
|
|
}
|
|
}
|