public class Destination { private String destinationAddress; private double[] coordinates; //stores lat/long as terms in the array public Destination(String inputAddress) { //constructor takes address, validates, then retrieves GPS coordinates and stores them setDestinationAddress(inputAddress); } private boolean validateAddress() { //determines if provided address is valid //execute call to address verification service API //for the purposes of control flow in this example, will always return true return true; } private void setCoordsForAddress() { //execute call using address out to covnersion API such as Google Geocoding code example //tmpCoords = geocodingAPI(address); with the assumption an array of coordinates is returned //these explicit declarations will serve as testing values double[] tmpCoords = { 27.993718340483223, -80.63008635738797}; coordinates[0] = tmpCoords[0]; coordinates[1] = tmpCoords[1]; } public void setDestinationAddress(String newAddress) { if (validateAddress()) { destinationAddress = newAddress; setCoordsForAddress(); } else { //prompt error message } } }