### Question:
Polygon { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Polygon = (\n"); for (Point pt : points) { builder.append(" "); builder.append(pt.toString()); } builder.append(")"); return builder.toString(); } Polygon(Point... points); Rectangle getBoundingBox(); List<Edge> extractEdges(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testToString() { Polygon poly = new Polygon(new Point(1,1), new Point(1, 3), new Point(6, 3), new Point(6, 1)); System.out.println(poly.toString()); Rectangle rect = new Rectangle(new Point(1,1), new Point(6, 3)); System.out.println(rect.toString()); }