package vnsim.gui; public class MyPoint{ private float x; private float y; public MyPoint(float x, float y){ this.x=x; this.y=y; } public float getX() { return x; } public void setX(float x) { this.x = x; } public float getY() { return y; } public void setY(float y) { this.y = y; } public boolean equals(Object obj){ if (!(obj instanceof MyPoint)){ return false; } MyPoint altPunct=(MyPoint) obj; if ((x-altPunct.getX())*(x-altPunct.getX())+(y-altPunct.getY())*(y-altPunct.getY())>2.25){ return false; } return true; } }