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 Zoo class.
Write a Zoo class. Your class does not have to do very much—it simply handles the creation and printing of Zoo objects. To give you a better idea of the Zoo class’s functionality, we provide a main method:
public static void main(String[] args){Zoo zoo1 = new Zoo();String[] animals = {"pig", "possum", "squirrel", "Chihuahua"};Zoo zoo2 = new Zoo(animals, "Parkville");animals[0] = "white tiger";Zoo zoo3 = new Zoo(animals, "San Diego");zoo1.display();zoo2.display();zoo3.display();}When run, the main method should print this:
The zoo is vacant.Parkville zoo: pig, possum, squirrel, ChihuahuaSan Diego zoo: white tiger, possum, squirrel, Chihuahua
Although it’s not required, you’re encouraged to write a complete program in order to test your Zoo class.
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.