| Constructor and Description |
|---|
Country(java.lang.String aName,
double anArea)
Constructs a country.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Country other)
Compares two countries by area.
|
double |
getArea()
Gets the area of the country.
|
java.lang.String |
getName()
Gets the name of the country.
|
public Country(java.lang.String aName, double anArea)
aName - the name of the countryanArea - the area of the countrypublic java.lang.String getName()
public double getArea()
public int compareTo(Country other)
compareTo in interface java.lang.Comparable<Country>other - the other country