Write a class Circle2D (centre x, y and radius, all private) and a public class CircleApp.
Circle2D()creates the circle of radius 1 centred at the origin, throughthis(0, 0, 1);Circle2D(x, y, radius).getArea(),getPerimeter()(useMath.PI).contains(double px, double py)— is the point inside the circle (border included)?contains(Circle2D other)— is the whole other circle inside this one?overlaps(Circle2D other)— do the circles share at least one point?toString().
main reads the first circle (x y radius), the second circle and a point. For the input
2 2 5.5 4 5 10.5 3 3
the program prints
First: circle at (2.0, 2.0) with radius 5.5
Area 95.03, perimeter 34.56
Second: circle at (4.0, 5.0) with radius 10.5
First contains the point (3.0, 3.0): true
First contains second: false
Second contains first: true
They overlap: true
First overlaps the default circle: true