Question: Write a Java program that reads in a line and a circle from the user and then determines whether they intersect or not. Note that

Write a Java program that reads in a line and a circle from the user and then
determines whether they intersect or not. Note that a line will be represented
by two distinct points ((p1x, p1y),(p2x, p2y)), and a circle by its center (cx,
cy) and radius r. Note that when the circle and line meet at only one point we
still consider that as "intersecting".
To determine if they intersect or not, you should write a method named
intersection() that accepts the line points and the circle center and radius
as parameters. The method would then use that data to determine if the line
and circle intersect or not. The method will return true if they intersect or
false if they don't intersect. Note that the input collection from the user
should not take place in this method.
Create a project and class named HW5FirstnameLastname in NetBeans
using your actual first and last names to hold your program.
Additional Assignment Requirements
You may use nested IF statements if you wish, but you aren't required.
You may NOT use a loop in this assignment.
You may NOT use Java libraries or programming concepts not
yet learned in this course. This assignment is designed to assess
that you understand the concepts being presented in the course this
week, not concepts we will learn at a later time.
Write a Java program that reads in a line and a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!