Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

jaba code please explain Create a class named Polygon that represents a geometric shape. - It should have data fields for the polygon's name and

jaba code please explain
image text in transcribed
Create a class named Polygon that represents a geometric shape. - It should have data fields for the polygon's name and its vertices (a list of at least three vertices, each having x and y coordinates). - It should have a constructor with parameters for the name and vertices, - Override the equals() method. It should consider two polygons as the same if they have the same name and the same set of vertices (regardless of vertex order). - Override the hashCode() method. Test your Polygon class by making sure it works properly with HashMap. Different Polygon objects with the same data should be considered the same by HashMap. In other words, when Polygon is used as a key, the two Polygon objects shouldn't result in two entries in the map. Turn in the following, - The source files (no zip file, just the individual java files). - A screen shot of your program in action. It should show the result of the test run

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

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions

Question

6. Explain the power of labels.

Answered: 1 week ago

Question

a. What is the purpose of the team?

Answered: 1 week ago

Question

a. How are members selected to join the team?

Answered: 1 week ago

Question

b. What are its goals and objectives?

Answered: 1 week ago