Question: Pond Program: As part of your internship at Parkvilles Parks and Recreation Department, youve been asked to write a program that keeps track of pond

Pond Program:

As part of your internship at Parkville’s Parks and Recreation Department, you’ve been asked to write a program that keeps track of pond life. Your program doesn’t have to do much—it simply prints pond life forms. For this exercise, provide a Pond class that uses the following two instance variables and supports the subsequent main method:

private String city; private String[] life = new String[] {

When run, the main method should print this:

No pond Parkville pond: no life Parkville pond: sunfish, algae, beer cans, tires

Although it’s not required, you’re encouraged to write a complete program in order to test your Pond class.

private String city; private String[] life = new String[] {"no life"}; public static void main(String[] args) { Pond pond1= new Pond(); Pond pond 2= new Pond("Parkville", null); Pond pond3 new Pond("Parkville". new String[] {"sunfish", "algae", "beer cans", "tires"}); pond1.display(); pond2.display(); pond3.display(); } // end main

Step by Step Solution

3.41 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the image provided it appears you are expected to write a Java class named Pond that has tw... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction To Programming With Java A Problem Solving Approach Questions!