Write a class `Point` with the following properties:

- A constructor that takes x and y coordinates as its inputs
- Methods
`getX()`and`getY()`which return the coordinates of the`Point` - A method
`distance(Point p)`that returns the distance of the point from`p` - A
`toString()`method that returns the`String`with the following format:`(x,y)`where`x`and`y`are the coordinates of the point

Write a class `RegularPolygon` (remember: a regular polygon is equilateral and equiangular) with the following properties:

- A constructor that takes a
`Point`(that will serve as its center), a number of sides and a radius as its three inputs - A method
`perimeter()`that returns the perimeter of the polygon - A method
`apothem()`that returns the apothem (distance from center to side) of the polygon - A method
`sideLength()`that returns the length of a side of the polygon - A method
`area()`that returns the area of the polygon **Challenging:**A method`getVertices()`that returns an`ArrayList<Point>`of all the vertices on the polygon, assuming that (at least) one of the vertices has the same y-coordinate as the center

Write the classes `EquilateralTriangle` and `Square`.