Question: PLEASE WRITE IN JAVA. Please answer asap because I only have 1 hour !!!!! I A square is an equilateral and equiangular polygon by default.

 PLEASE WRITE IN JAVA. Please answer asap because I only have

PLEASE WRITE IN JAVA. Please answer asap because I only have 1 hour !!!!! I A square is an equilateral and equiangular polygon by default. Implement these properties of a square to design a class named Square. The class contains a private data field named x and y that store the respective coordinates of the square. All data fields inside the class are private, therefore the class must contain accessor and mutator methods. Calculate the area and perimeter of the square using two different methods. Write a test program to create two squares with the value - (4.5) where 10 refers to the number of sides and 5 refers to the length of each side - (4.2.8, 2.8) where 4 is the number of sides, 2 is the length of each side, 8 & 2.8 are (x,y) coordinates of the square on a plane. Display the area and perimeter of each square

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!