subject

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)2 + (y1 - y2)2).

There are three conditions that arise:

1. If d == r1 + r2
Circles touch each other.
2. If d > r1 + r2
Circles do not touch each other.
3. If d < r1 + r2
Circles intersect.
​

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 15:10
Chiko bought 75 shares of stock at $19.58 per share. he received dividends of $73.42 during the year. at the end of the year, his stock was valued at $22.14. what was his purchase price?
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
Where would you click to edit the chart data?
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
You know the right answer?
Write a method that prints on the screen a message stating whether 2 circles touch each other, do no...
Questions
question
Physics, 12.10.2020 21:01