Question: Question 1 Write a method that states whether 2 circles intersect or not. The method accepts the coordinates of the center of the first circle
Question 1 Write a method that states whether 2 circles intersect or not. The method accepts the coordinates of the center of the first circle and its radius, and the coordinates of the center of the second circle and its radius. Public static boolean Intersection(double x1, double y1, double r1, double x2, double y2, double r2) Write a test program that allows the user to enter the centers coordinates and radiuses of two circles and check whether the circles intersects or not. The program stops when N is entered. Note: Distance between centers C1 and C2 is calculated as follows: d = Math.sqrt ((x1 - x2) 2 + (y1 - y2) 2 ). If d <= r1 + r2 Circles Intersects. If d > r1 + r2 Circles do not intersect.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
