Question: java using while loop Sudent Name: Total Points (20 pts) Geometry: point in a rectangle? Problem Description: Write a program that prompts the wet to

java
using while loop
javausing while loop Sudent Name: Total Points (20 pts) Geometry: point in

Sudent Name: Total Points (20 pts) Geometry: point in a rectangle? Problem Description: Write a program that prompts the wet to enter a point (, y) and checks whether the point is within the rectangle centered at (0, 0) with width 20 and bright 15. For example, (9.7) is inside the rectangle and (11,4) is outside the rectangle, as shown in the Figure. If the point is exactly on the border of the rectangle, make a special output for this scenario. For instance, the point (0, 7.5) should return that the point is on the border of the rectangle. So, we have three potential outputs: The point is within the rectanfle, the point is not within the rectangle, and the point is on one or more of the borders of the rectangle, 75 * (-9,7) (114) -10 10 while lo -75 loop bod Hication Hint: A point is in the rectangle if its horizontal distance to (o) is less than 20/2-10 and it vertical distance to (o) is less than 15/20 -75. Be aware of the difficulties encountered with floating point arithmetic night be best to hardcode these values to be sure you have an exact representation Hint: Work with double values/variables. That is the user should be able to enter points with the integer values o floating point values 371 words English (United States) Focus CHINTHI TV IN

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 Databases Questions!