#include "Line.h" Line::Line(){ p1=new Point(); p2=new Point(); } Line::Line(int x1, int y1, int x2, int y2){ p1=new Point(x1, y1); p2=new Point(x2, y2); }; Line::Line(Point& up1, Point& up2){ p1=new Point(up1); p2=new Point(up2); } Line::~Line(){ cout << "Line loppuu" << endl; delete p1; delete p2; } void Line::tulosta() const{ cout << "Line: "; p1->tulosta(); p2->tulosta(); } Line& Line::operator=(const Line& l){ *p1=*(l.p1); *p2=*(l.p2); return *this; }