Write a program that lets the user left-click to add points to a polygon. When the user right-clicks, close the polygon and calculate its area.
Hint: Consider the trapezoids defined by the polygon's edges, the X axis, and sides dropped vertically from the polygon's vertices to the X axis.