#ifndef POINT_H
#define POINT_H
#include <iostream>

using namespace std;

class Point
{
public:
    Point(int a = 0, int b = 0);
    virtual ~Point();

    Point(const Point& other);
    Point& operator=(const Point& other);

    inline int Getx()const
    {
        return x;    // x = p.Getx()
    }
    void Setx(int val)
    {
        x = val;    // p.Setx(4)
    }
    int Gety() const
    {
        return y;
    }
    void Sety(int val)
    {
        y = val;
    }

    Point operator+ (const Point & p) const;
    Point & operator+= (const Point & p);

  //  friend Point operator+ (int x, const Point & p);
  //  friend Point operator+ (const Point & p, int x);

   // friend ostream & operator<< (ostream & os, const Point & p);
   /**
   TENTATIVE AVORTEE DE FONCTION MEMBRE pour <<
   ostream & operator<< (ostream & os) const;
   p.operator<<(cout);
   p << cout; BEURK ON ARRETE TOUT
    */
private:
    int x;;
    int y;;
};

extern ostream & operator<< (ostream & os, const Point & p);
#endif // POINT_H
