private double distance; public double getDistance() { return distance; } public Location(String name, double latitude, double longitude) { this.name = name; this.latitude = (Math.PI * latitude) / 180; this.longitude = (Math.PI * longitude) /180; this.distance = Math.random(); }