Programming Exercise finds a convex hull for a set of points entered from the console. Write a

Question:

Programming Exercise finds a convex hull for a set of points entered from the console. Write a program that enables the user to add/remove points by clicking the left/right mouse button, and displays a convex hull, as shown in Figure.

Section introduced Graham?s algorithm for finding a convex hull for a set of points. Assume that the Java?s coordinate system is used for the points. Implement the algorithm using the following method:

image

Write a test program that prompts the user to enter the set size and the points and displays the points that form a convex hull. Here is a sample run:

image

image

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

Step by Step Answer:

Question Posted: