Question: A polygon is convex if it contains any line segments that connects two points of the polygon. Write a program that prompts the user to
A polygon is convex if it contains any line segments that connects two points of the polygon. Write a program that prompts the user to enter the number of points in a convex polygon, enter the points clockwise, then displays the area of the polygon. For the formula for computing the area of a polygon, see http://www.mathwords.com/a/area_convex_polygon.htm. Here is a sample run of the program:

Enter the number of points: 7 -Enter Enter the coordinates of the points: -12 0 -8.5 10 0 11.4 5.5 7.8 6 -5.5 0 -7 -3.5 -5.5 -Enter The total area is 244.57
Step by Step Solution
3.30 Rating (162 Votes )
There are 3 Steps involved in it
import javautilScanner import javautilArrayList public class Exercise1115 public static void mainString args Scanner input new ScannerSystemin Systemo... View full answer
Get step-by-step solutions from verified subject matter experts
