In Java
1. The UML class diagram of two classes, Point and Circle, is given below. All the constructors of the Circle class assign appropriate values passed as parameters for the center and radius. For the no-argument constructor, invoke the second constructor to set all values to 0. Most of the methods of the Circle class are self-explanatory. The setCenter method assigns a new center with the given values. The getCenter method returns a copy of the center of a Circle object. The insideCircle method returns true when point p is inside a circle. You need to compute the distance between the center and the point. When the difference is less than the radius, it is inside the circle. Use the getDistance method of the Point class to get the distance. The toString method returns a string in the form like "The center of the circle is (x,y) with radius z".
Point
-x: int
-y: int
+Point()
+Point(x: int, y: int)
+getX(): int
+getY(): int
+getPoint(): Point
+getDistance(p: Point): double
+toString(): String
Circle
-center: Point
-radius: double
+Circle()
+Circle(cx: int, cy: int, radius: double)
+Circle(c: Point, radius: double)
+setCenter(cx: int, cy: int): void
+getCenter(): Point
+insideCircle(p: Point): boolean
+toString(): String
a. Define the Circle class. Do NOT define the Point class. [10]
b. Write a code segment to create an object of Circle c1 by calling the third constructor. Assume some appropriate initial values. [2]
c. Write a code segment to see whether (4,5) is inside circle c1 or not. [2]
d. Write a code segment to display the information of c1 Circle with area. [1]