Class CityGuard

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int amount  
    • Constructor Summary

      Constructors 
      Constructor Description
      CityGuard()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void update​(int amount)
      Change the amount by a positive or negative amount.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • amount

        private int amount
    • Constructor Detail

      • CityGuard

        public CityGuard()
    • Method Detail

      • update

        public void update​(int amount)
        Description copied from interface: ICityGuard
        Change the amount by a positive or negative amount.
        Specified by:
        update in interface ICityGuard
        Parameters:
        amount - new number of city guards.