Created
November 16, 2020 11:02
-
-
Save dev-aritra/d74ce86b2d615a94dbfd157b6045ec1e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Location { | |
private final String zipCode; | |
private final Double latitude; | |
private final Double longitude; | |
public Location(String zipCode, Double latitude, Double longitude) { | |
this.zipCode = zipCode; | |
this.latitude = latitude; | |
this.longitude = longitude; | |
} | |
boolean isValid() { | |
// Some validation logic | |
return true; | |
} | |
public String getZipCode() { | |
return zipCode; | |
} | |
public Double getLatitude() { | |
return latitude; | |
} | |
public Double getLongitude() { | |
return longitude; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment