1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
import java.io.*;
class testPoint
{
public static void main(String[] args)
{
Point p;
System.out.println("U");
}
}
class Point
{
//Ses coordonées
private int x;
private int y;
//Ses Constructeurs
public Point()
{x=0;
y=0;}
public Point(int x,int y)
{this.x = x;
this.y= y;}
public Point(Point p)
{x = p.x;
y= p.y;}
//Ses methodes
public int getX()
{return x;}
public int getY()
{return y;}
public boolean isEqual(Point p)
{if(x==p.x & y==p.y)
return true;
else
return false;
}
public String toString()
{return("("+x+","+y+")");}
} |