public boolean isPath(City originCity, 
                      City destinationCity) {
  City  nextCity;
  boolean done;

  // mark the current city as visited
  markVisited(originCity);

  // base case: the destination is reached
  if (originCity.compareTo(destinationCity) == 0) {
    return true;
  }
  else { // try a flight to each unvisited city
    done = false;
    nextCity = getNextCity(originCity);

    while (nextCity != null && !done) {
      done = isPath(nextCity, destinationCity);
      if (!done) {
        nextCity = getNextCity(originCity);
      }  // end if
    }  // end while

    return done;
  }  // end if
}  // end isPath