Package model.city

Class CityStatistics

java.lang.Object
model.city.CityStatistics
All Implemented Interfaces:
Serializable

public class CityStatistics extends Object implements Serializable
See Also:
  • Constructor Details

    • CityStatistics

      public CityStatistics(Budget budget)
  • Method Details

    • getCityRelatedSatisfaction

      public double getCityRelatedSatisfaction(Date now)
    • getBudget

      public Budget getBudget()
    • getPopulation

      public int getPopulation(CityRegistry cityRegistry)
      Get city population.
      Parameters:
      cityRegistry - used to get the zones
      Returns:
      number of citizens.
    • getCitySatisfaction

      public double getCitySatisfaction()
    • getTaxEffect

      public double getTaxEffect()
    • getIndComZoneBalance

      public double getIndComZoneBalance()
    • getBudgetEffect

      public double getBudgetEffect(Date now)
    • setCitySatisfaction

      public void setCitySatisfaction(GameModel gm)
      Setting city average satisfaction being equal to the sum of the average satisfaction of zones and of the average of some additional effects which are related to the whole city (avgCommonZoneSatisfaction).
      Parameters:
      gm - used to get the cityRegistry
    • updateNrZones

      public void updateNrZones(CityRegistry cityRegistry)
      Update the number of zones of each type.
      Parameters:
      cityRegistry - to get the zones
    • getNrCitizenSecondaryEducation

      public int getNrCitizenSecondaryEducation(CityRegistry cityRegistry)
      Get the number of citizens who have a secondary level of education (school).
      Parameters:
      cityRegistry - to get the collection of citizens.
      Returns:
      nr of citizens who have a secondary level of education (school).
    • getNrCitizenHigherEducation

      public int getNrCitizenHigherEducation(CityRegistry cityRegistry)
      Get the number of citizens who have a higher level of education (university).
      Parameters:
      cityRegistry - to get the collection of citizens.
      Returns:
      nr of citizens who have a higher level of education (university).