|
|
@ -4,15 +4,22 @@ public class Country extends Area{ |
|
|
|
private Area capital; |
|
|
|
private Area capital; |
|
|
|
|
|
|
|
|
|
|
|
Country(String name, int population, int square, String capitalName, int capitalPopulation, int capitalSquare){ |
|
|
|
Country(String name, int population, int square, String capitalName, int capitalPopulation, int capitalSquare){ |
|
|
|
init(name, population, square, capitalName, capitalPopulation, capitalSquare); |
|
|
|
this.init(name, population, square); |
|
|
|
|
|
|
|
this.capital = new Area(); |
|
|
|
|
|
|
|
getCapital().init(capitalName, capitalPopulation, capitalSquare); |
|
|
|
} |
|
|
|
} |
|
|
|
public Country() { |
|
|
|
public Country() { |
|
|
|
} |
|
|
|
} |
|
|
|
public void init(String name, int population, int square, String capitalName, int capitalPopulation, int capitalSquare){ |
|
|
|
public void init(String name, int population, int square, String capitalName, int capitalPopulation, int capitalSquare){ |
|
|
|
setCapital(capitalName, capitalPopulation, capitalSquare); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* setCapital(capitalName, capitalPopulation, capitalSquare); |
|
|
|
setName(name); |
|
|
|
setName(name); |
|
|
|
setPopulation(population); |
|
|
|
setPopulation(population); |
|
|
|
setSquare(square); |
|
|
|
setSquare(square); |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|