created an abstract superclass Geometry for Polygon and LineSegment