You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
799 B

package country.ru.molokoin;
public class Country extends Area{
private Area capital;
Country(String name, int population, int square, String capitalName, int capitalPopulation, int capitalSquare){
setCapital(capitalName, capitalPopulation, capitalSquare);
setName(name);
setPopulation(population);
setSquare(square);
}
/**
* @param сapital the сapital to set
*/
public void setCapital(String name, int population, int square) {
this.capital = new Area(name, population, square);
}
/**
* @return the сapital
*/
public Area getCapital() {
return capital;
}
public static void main(String[] args) {
System.out.println("Country.main()");
}
}