main
Class PlanetlabCity
java.lang.Object
main.PlanetlabCity
public class PlanetlabCity
- extends java.lang.Object
The PlanetlabCity
class is the main class. It takes in a city
inputfile name and a latitude and longitude and prints the closest city to
that location.
Constructor Summary |
PlanetlabCity(java.lang.String inputFileName,
java.lang.String latitude,
java.lang.String longitude)
Initializes the PlanetlabCity , which reads the input file
and prints the city closest to the latitude and longitude passed in. |
Method Summary |
static void |
main(java.lang.String[] args)
The main method of PlanetlabCity . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cityFinder
private CityFinder cityFinder
PlanetlabCity
public PlanetlabCity(java.lang.String inputFileName,
java.lang.String latitude,
java.lang.String longitude)
- Initializes the
PlanetlabCity
, which reads the input file
and prints the city closest to the latitude and longitude passed in.
- Parameters:
inputFileName
- a String
that is the city input file's namelatitude
- a String
with the value of the latitudelongitude
- a String
with the value of the longitude
main
public static void main(java.lang.String[] args)
- The main method of
PlanetlabCity
. A PHP script should
call this, passing in the name of the input file and the latitude and
longitude as the command line arguments.
- Parameters:
args
- a String
array. It should contain the input
file's name, the latitude, and the longitude in that order.