Question: Write a method that prints on the screen a message stating whether 2 circles touch each other, do not touch each other or intersect. The

Write a method that prints on the screen a message stating whether 2 circles touch each other, do not touch each other or intersect. 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. The header of the method is as follows: public static void checkintersection(double x1, double y1, double r1, double x2, double y2, double r2) Hint: Distance between centers C1 and C2 is calculated as follows: d = Math.sqrt{(x1 - x2) + (y1 - y2)). Three conditions arise: 1. If d -- r1+r2 Circles touch each other. 2. If d > r1+r2 Circles do not touch each other. 3. If d
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
