Package model.common

Class Citizen

java.lang.Object
model.common.Citizen
All Implemented Interfaces:
Serializable

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

  • Method Details

    • getSatisfaction

      public double getSatisfaction(GameModel gm)
    • getTax

      public double getTax(double taxRate)
    • payTax

      public double payTax(double taxRate)
      Pays the tax and records the pay
      Parameters:
      taxRate - the current tax rate
      Returns:
      the tax to be paid by the person
    • getDistanceLiveWork

      public static int getDistanceLiveWork(GameModel gm, Zone livingPlace, Zone workplace)
      Getting distance between living place and working place.
      Parameters:
      gm - gameModel
      livingPlace - living place of the citizen
      workplace - work place of the citizen
      Returns:
      distance from living place to working place
    • getWorkplace

      public Zone getWorkplace()
    • getLivingPlace

      public Zone getLivingPlace()
    • getLevelOfEducation

      public LevelOfEducation getLevelOfEducation()
    • getPension

      public int getPension()
    • getAge

      public int getAge()
    • setWorkplace

      public void setWorkplace(GameModel gm, Zone workplace)
    • setLevelOfEducation

      public void setLevelOfEducation(LevelOfEducation levelOfEducation)
    • setIsUnemployed

      public void setIsUnemployed(boolean isUnemployed)
    • incAge

      public void incAge()
    • isUnemployed

      public boolean isUnemployed()
    • retire

      public void retire()
    • addPaidTax

      public void addPaidTax(double newTax)
    • getPast20AvgIncome

      public double getPast20AvgIncome()
      Returns:
      average income of the last 20 years.
    • toString

      public String toString()
      Overrides:
      toString in class Object