Class CityNonUserManager

java.lang.Object
collectionManagers.modeManagers.nonUserMode.CityNonUserManager
All Implemented Interfaces:
ModeManager<City>

public class CityNonUserManager extends Object implements ModeManager<City>
A ModeManager implementation for generating City objects without user input.
  • Constructor Details

    • CityNonUserManager

      public CityNonUserManager(Scanner scanner)
      Constructor for setup handler's scanner.
      Parameters:
      scanner - Command scanner for reading argument
  • Method Details

    • buildObject

      public City buildObject() throws BuildObjectException
      Generates a City object by reading values from the scanner and sets its attributes accordingly.
      Specified by:
      buildObject in interface ModeManager<City>
      Returns:
      A generated City object.
      Throws:
      BuildObjectException - If any of the generated values violate restrictions and cannot be added to the collection.