implemented compareTo in Point.java