#include <iostream>

using namespace std;

class Point {
public:
    Point(float x, float y) : x(x), y(y) { }
    void show() const;              // interface
    void move(float dx, float dy);  // interface
private:
    float x, y;
};

void Point::show() const {
    cout << "(" <<  x << ", " << y << ")";
}

void Point::move(float dx, float dy) {
    this->x += dx;
    this->y += dy;
}

class Triangle {
public:
    Triangle(const Point &a, const Point &b, const Point &c) :
        a(a), b(b), c(c) {};
    Triangle(float ax, float ay, float bx, float by, float cx, float cy) :
        a(ax, ay), b(bx, by), c(cx, cy) {};
    void show() const;
    void move(float dx, float dy);
private:
    Point a, b, c;
};

void Triangle::show() const {
    cout << "Triangle ";
    a.show(); cout << " : ";
    b.show(); cout << " : ";
    c.show(); cout << endl;
}

void Triangle::move(float dx, float dy) {
    this->a.move(dx, dy);
    this->b.move(dx, dy);
    this->c.move(dx, dy);
}

int main() {
    Point p(0, 1), q(1, 0), r(1, 1);

    Triangle T1(p, q, r);
    Triangle T2(1, 2, 3, 4, 5, 6);

    T1.show();
    T2.show();

    T1.move(2, 3);
    T1.show();
    
    return 0;    
}
