Class Constituency

java.lang.Object
org.episteme.social.politics.Constituency
All Implemented Interfaces:
Serializable, Named

public class Constituency extends Object implements Named, Serializable
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 Details

    • Constituency

      public Constituency(String name, Place area, int population)
      Creates a new Constituency.
      Parameters:
      name - the name of the district
      area - the geographic region
      population - total resident population
      Throws:
      NullPointerException - if name or area is null
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface Named
    • getArea

      public Place getArea()
      Returns the geographic area of the constituency.
      Returns:
      the place/area
    • 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

      public String toString()
      Overrides:
      toString in class Object