Question: Please use Java Problem 1: Advanced Circle class We often use UML (Unified Modeling Language) to indicate the design of a class. Given the following
Problem 1: Advanced Circle class We often use UML (Unified Modeling Language) to indicate the design of a class. Given the following UML for an advanced circle, implement this Circle class. Circle radius:double X: double y: double + Circle + Circle(radius: double x: double, y: double) +getArea(): double + getPerimeter(): double +getX(): double +getY(): double +setRadius(radius: double): void +setX(x: double): void +setY(y: double): void +move(x: double, y:double):void +isintersect(other: Circle): boolean Note: 1) For the constructor Circle with no parameters, please call the second constructor by using the this keyword, and pass arguments as (1 0, 0); 2) x is the x-coordinates of the center of a circle (c1) 3) y is the y-coordinates of the center of a circle (c2) 4) Two circles will intersect if the distance between their centers is less than the sum of their radius. distance(c1, c2) = (x1-x2)(x1-x2) + (y1-y2)(y1-y2) sum the the radius: (radius1 + radius2)*(radius 1+ radius2) 5) move is to move the circle to a new center
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
