Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For task 2, it mentions PantherID which is essentially like a driver license number. thanks in advance C. Task: 1. Write a Park class with

For task 2, it mentions "PantherID" which is essentially like a driver license number.

thanks in advance

image text in transcribed
C. Task: 1. Write a Park class with the following instance variables: 1) String ParkName; 2) int ParkID; 3) String ParkShape; and 4) double ParkLength. Please implement the following methods: i) ParkNameGetter(): Return the name of the park. ii) ParkIDGetter(): Return the ID of the park. iii) ParkLengthGetter(): Return the length of the park. Note that, 1) ParkLength is private while the other variables are public. 2) ParkShape only includes "Circle" and "Square". 3) Parks may have the same name, but ParkID is unique. 4) Students should create the correct constructor. 2. Write a ParkClient class. i) Create an array of Park: - ParkArray has 5 elements; - Set the first park in ParkArray with the following parameters: ParkName: CSC1302, ParkID: Last 2 digits of PantherID, ParkShape: "Circle", ParkLength: 5. - Set the second park in ParkArray with the following parameters: ParkName: CSC1302. ParkID: Last 2 digits of PantherID + 3, ParkShape: "Square", ParkLength: 6. - Randomly Set the other three parks in ParkArray. ii) Print out the information of the Largest Park of all parks in the ParkArray

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions