// Point.cpp #include #include "Point.h" using namespace std; Point::Point(int x, int y) : _x(x), _y(y) { } Point::Point(const Point& p) : _x(p._x), _y(p._y) { } Point::~Point(void) { } int Point::getx(void) const { return _x; } int Point::gety(void) const { return _y; } void Point::set(int x, int y) { _x = x; _y = y; } void Point::move(int dx, int dy) { _x += dx; _y += dy; } ostream& operator<<(ostream& os, const Point& p) { os << '(' << p._x << ',' << p._y << ')'; return os; }