Implement a class Polygon that contains an array list of Point2D.Double objects. Support methods
public void add(Point2D.Double aPoint)
public void draw(Graphics2D g2)
Draw the polygon by joining adjacent points with a line, and then closing it up by joining the end and start points. Write a graphical application that draws a square and a pentagon using two Polygon objects.
Here is a sample program output: