Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Specifics: Create a class for the Parks Department in Cloverdale. The class is n

ID: 3672763 • Letter: S

Question

Specifics:

Create a class for the Parks Department in Cloverdale. The class is named Park, and it contains a String field for the name of the park, an integer field for the size in acres, and four Boolean fields that hold whether the park has each of these features: picnic facilities, a tennis court, a playground, and a swimming pool. Include get and set methods for each field. Include code in the method that sets the number of acres and does not allow a negative number or a number over 400. Save the file as Park.java.

Then, create a program with methods that do the following:

Accepts a Park parameter and returns a Boolean value that indicates whether the Park has both picnic facilities and a playground.

Accepts a Park parameter and four Boolean parameters that represent requests for the previously mentioned Park features. The method returns true if the Park has all the requested features.

Accepts a Park parameter and four Boolean parameters that represent requests for the previously mentioned Park features. The method returns true if the Park has exactly all the requested features and no others.

Accepts a Park parameter and returns the number of facilities that the Park features.

Accepts two Park parameters and returns the larger Park.

Declare at least three Park objects, and demonstrate that all the methods work correctly. Save the program as TestPark.java.

Explanation / Answer

Please find the required program below :

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote