public class Point
{
	String nom;
	int abscisse;
	int ordonnee;
	
	public Point( ){
		this.nom = "";
		this.abscisse = 0;
		this.ordonnee = 0;
	}
	
	public Point( String s ){
		this.nom = s;
		this.abscisse = 0;
		this.ordonnee = 0;
	}
	
	public Point( String s , int x , int y ){
		this.nom = s;
		this.abscisse = x;
		this.ordonnee = y;
	}
	
	public void setAbscisse( int x ){
		this.abscisse = x;
	}
	
	public void setOrdonnee( int y ) {
		this.ordonnee = y;
	}
	
	public void setNom( String s ){
		this.nom = s;
	}
	
	public int getAbscisse(){
		return this.abscisse;
	}

	public int getOrdonnee(){
		return this.ordonnee;
	}

	public String getNom(){
		return this.nom;
	}
	
	public double distance( Point p2 ){
		return Math.sqrt( Math.pow( this.getAbscisse() - p2.getAbscisse() , 2 ) + Math.pow( this.getOrdonnee() - p2.getOrdonnee() , 2 ) );
	}

	public void translater( int depHorizontal , int depVertical ){
		this.setAbscisse( this.getAbscisse() + depHorizontal );
		this.setOrdonnee( this.getOrdonnee() + depVertical );
	}
	
	public boolean equals(Point p)
	{
		return this.getAbscisse()==p.getAbscisse() && this.getOrdonnee()==p.getOrdonnee();
	}
	
	public String toString(){
		String s = "";
		s = this.getNom()+"( "+Integer.toString(this.getAbscisse())+" , "+Integer.toString(this.getOrdonnee())+" )";
		return s;
	}
	
}
















