#include "Point.h" #include "Line.h" /* * ========================================================================= * Main Program * ========================================================================= */ int main() { Point::printInstances(); Point a; a.setX(1.1); a.setY(2.2); a.printInstances(); Point c; c = a; cout << "(" << c.getX() << ", " << c.getY() << ")" << endl; Point b(3.2, 5.6); cout << "Distance from origin: " << c.distance() << endl; if (c < b) { Point d = c; d = d; cout << "C is nearer to the origin than B" << endl; d.printInstances(); } else { cout << "C is further from the origin than B" << endl; } cout << "D has now gone out of scope and been destroyed" << endl; c.printInstances(); Line L(a,b); cout << "Created a line." << endl; }