Class Constituency
java.lang.Object
org.episteme.social.politics.Constituency
- All Implemented Interfaces:
Serializable, Named
Represents an electoral district or voting precinct.
Constituencies define the geographic area and population size for representative allocation.
* @version 1.1
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstituency(String name, Place area, int population) Creates a new Constituency. -
Method Summary
Modifier and TypeMethodDescriptiongetArea()Returns the geographic area of the constituency.intReturns the estimated or actual number of eligible voters.getName()intReturns the total population count.voidsetElectorateSize(int size) Updates the number of eligible voters in the constituency.voidsetPopulation(int population) Sets the total population count.toString()
-
Constructor Details
-
Constituency
Creates a new Constituency.- Parameters:
name- the name of the districtarea- the geographic regionpopulation- total resident population- Throws:
NullPointerException- if name or area is null
-
-
Method Details
-
getName
-
getArea
-
getPopulation
public int getPopulation()Returns the total population count.- Returns:
- population
-
setPopulation
public void setPopulation(int population) Sets the total population count.- Parameters:
population- new population
-
getElectorateSize
public int getElectorateSize()Returns the estimated or actual number of eligible voters.- Returns:
- electorate size
-
setElectorateSize
public void setElectorateSize(int size) Updates the number of eligible voters in the constituency.- Parameters:
size- electorate size
-
toString
-