Zoo Animals Program:
As part of your internship at Parkville’s new zoo, you’ve been asked to write a program that keeps track of the zoo animals. You want to make the program general-purpose so that when you’re done, you can sell your program to zoos worldwide and make millions. Thus, you decide to create a generic
Zooclass.
Write a
Zooclass. Your class does not have to do very much—it simply handles the creation and printing of
Zooobjects. To give you a better idea of the
Zooclass’s functionality, we provide a
mainmethod:
public static void main(String[] args){ Zoo zoo1 = new Zoo(); String[] animals = {"pig", "possum", "squirrel", "Chihuahua"}; Zoo zoo2 = new Zoo(animals, "Parkville"); Zoo1.display(); zoo2.display();}When run, the
mainmethod should print this:
The zoo is vacant.Parkville zoo: pig, possum, squirrel, Chihuahua
Although it’s not required, you’re encouraged to write a complete program in order to test your
Zooclass.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.