Answer:
The method is as follows:
public static void checkIntersection(double x1, double y1, double r1, double x2, double y2, double r2){
double d = Math.sqrt(Math.pow((x1 - x2),2) + Math.pow((y1 - y2),2));
if(d == r1 + r2){
System.out.print("The circles touch each other"); }
else if(d > r1 + r2){
System.out.print("The circles do not touch each other"); }
else{
System.out.print("The circles intersect"); }
}
Explanation:
This defines the method
public static void checkIntersection(double x1, double y1, double r1, double x2, double y2, double r2){
This calculate the distance
double d = Math.sqrt(Math.pow((x1 - x2),2) + Math.pow((y1 - y2),2));
If the distance equals the sum of both radii, then the circles touch one another
<em> if(d == r1 + r2){</em>
<em> System.out.print("The circles touch each other"); }</em>
If the distance is greater than the sum of both radii, then the circles do not touch one another
<em> else if(d > r1 + r2){</em>
<em> System.out.print("The circles do not touch each other"); }</em>
If the distance is less than the sum of both radii, then the circles intersect
<em> else{</em>
<em> System.out.print("The circles intersect"); }</em>
}