You need to decide an appropriate internal representation of the Polygon before you can start, e.g. do you want to store the lines of the polygon, or just the points, or both? Should you use array, vector, linked list or something else? etc. Declare the appropriate information in the private section of the class.
I'm not sure should I use a vector or linked list?
Tasked to implement the following functions.
Polygon(const Point & p1, const Point & p2, const Point & p3)
virtual void print( ostream & out )
virtual double perimeter()
virtual bool add(Point & p)
virtual bool add(Line & exist, Point & p)
Line and Point classes have already been implemented.