Implemented Polygon class