Problem

Zoo Animals Program:As part of your internship at Parkville’s new zoo, you’ve been asked t...

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");     Zoo1.display();     zoo2.display();}

When run, the

main
method 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

Zoo
class.

Step-by-Step Solution

Request Professional Solution

Request Solution!

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.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 9
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT