Question: Free Response (JAVA) Part I: You decide to visit all of the Parks in the Seattle area during 2021, and keep a photo diary of

Free Response (JAVA) Part I: You decide to visit all of the Parks in the Seattle area during 2021, and keep a photo diary of the experience! To keep track of the Parks and where you've been, you create the Park class. Park class instructions. Write the complete class declaration for a Park class. A Park object has two instance variables, the park's name and the numPhotos (number of photos taken for your photo diary) Include a non-default constructor with two parameters, a String variable and an int variable. The constructor should set the Park objects name to the String passed in as a parameter and numPhotos to the int passed in as a parameter. Include a non-default constructor with one parameter, a String variable. The constructor should set the Park objects name to the String passed in as a parameter and numPhotos to zero. Include two accessor methods called getName and getNumPhotos Include two mutator methods called setName and setNumPhotos Include a toString method that will return a String containing all instance variable information in a readable format. Include an extra method called deletePhotos that will modify the number of photos and reset the number to zero. Include a static variable called numParks that keeps track of the number of Park objects created; update the variable appropriately. Include a static method called getNumParks that will return the static variable.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!