package fr.eisti;

public class Point {
	private String nom;
	private int abscisse;
	private int ordonees;
	
	public Point(String nom, int abscisse, int ordonees) {
		this.nom = nom;
		this.abscisse = abscisse;
		this.ordonees = ordonees;
	}

	public double distance(Point autrePoint){
		return Math.sqrt(Math.pow(this.abscisse-autrePoint.abscisse, 2) + Math.pow(this.ordonees-autrePoint.ordonees, 2));
	}
	@Override
	public String toString() {
		return "Point [nom=" + nom + ", abscisse=" + abscisse + ", ordonees="
				+ ordonees + "]";
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public int getAbscisse() {
		return abscisse;
	}

	public void setAbscisse(int abscisse) {
		this.abscisse = abscisse;
	}

	public int getOrdonees() {
		return ordonees;
	}

	public void setOrdonees(int ordonees) {
		this.ordonees = ordonees;
	}
	
}
