Write a program LineDistanceTester that constructs a line joining the points (100, 100) and (200, 200), then

Question:

Write a program LineDistanceTester that constructs a line joining the points (100, 100) and (200, 200), then constructs points (100, 200), (150, 150), and (250, 50). Print the distance from the line to each of the three points, using the ptSegDist method of the Line2D class. Also print the expected values. (Draw a sketch on graph paper to find what values you expect.)

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Big Java, Enhanced Early Objects

ISBN: 9781119499091

7th Edition

Authors: Cay S Horstmann

Question Posted: