Write, Compile and Execute a Java program that prompts the user to enter a point (x, y) and checks whether the point is within the circle centered at (0, 0) with radius 10. For example, (4, 5) is...


Write, Compile and Execute a Java program that prompts the user to enter a point (x, y) and checks whether<br>the point is within the circle centered at (0, 0) with radius 10. For example, (4, 5) is inside the circle and (9, 9)<br>is outside the circle, as shown in Figure below. (Hint: A point is in the circle if its distance to (o, 0) is less than<br>or equal to 10. The formula for computing the distance is the square root of ((x2 - x1)² + (Y2 - Y1)²). Test your<br>program to cover all cases.)<br>у-аxis A<br>У-аxis A<br>(9, 9)<br>(4, 5)<br>(6, 4)<br>.(2, 2)<br>(0, 0)<br>х-аxis<br>(0,0)<br>х-ахis<br>Two sample runs are shown below.<br>Enter a point with two coordinates: 2 2 -Enter<br>Point (2.0, 2.0) is in the rectangle<br>Enter a point with two coordinates: 6 4 -Enter<br>Point (6.0, 4.0) is not in the rectangle<br>

Extracted text: Write, Compile and Execute a Java program that prompts the user to enter a point (x, y) and checks whether the point is within the circle centered at (0, 0) with radius 10. For example, (4, 5) is inside the circle and (9, 9) is outside the circle, as shown in Figure below. (Hint: A point is in the circle if its distance to (o, 0) is less than or equal to 10. The formula for computing the distance is the square root of ((x2 - x1)² + (Y2 - Y1)²). Test your program to cover all cases.) у-аxis A У-аxis A (9, 9) (4, 5) (6, 4) .(2, 2) (0, 0) х-аxis (0,0) х-ахis Two sample runs are shown below. Enter a point with two coordinates: 2 2 -Enter Point (2.0, 2.0) is in the rectangle Enter a point with two coordinates: 6 4 -Enter Point (6.0, 4.0) is not in the rectangle

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here