public class Airport
extends Object
| Modifier and Type | Field and Description |
|---|---|
private String |
city |
private String |
code |
private double |
latitude |
private double |
longitude |
private String |
state |
| Modifier | Constructor and Description |
|---|---|
protected |
Airport(String code)
Creates an airport that serves as a key for a search in other classes.
|
|
Airport(String code,
double latitude,
double longitude,
String city,
String state)
Creates an airport.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Returns true if this airport has the same airport code as the argument,
and false otherwise.
|
String |
getCity() |
String |
getCode() |
double |
getLatitude() |
double |
getLongitude() |
String |
getState() |
String |
toString()
Returns a string exactly in this format: (code-city, state: latitude, longitude).
|
private String city
private String code
private double latitude
private double longitude
private String state
protected Airport(String code)
code - public Airport(String code,
double latitude,
double longitude,
String city,
String state)
code - latitude - longitude - city - state - public boolean equals(Object o)
equals in class Objecto - public String getCity()
public String getCode()
public double getLatitude()
public double getLongitude()
public String getState()
public String toString()
(ANB-Anniston, AL: 33.6, 85.9)
toString in class Object