public string ChangeManagementRequirement(string[] parameters) { IManagementRequirement requirement = this.InstantiateNewManagementRequiremenet(parameters); this.BalanceManager.ManagemenentRequirement = requirement; return("Management requirement changed!"); }
public CommandHandler(IRecyclingStation recyclingStation, IGarbageProcessor garbageProcessor) { this.RecyclingStation = recyclingStation; this.GarbageProcessor = garbageProcessor; this.managementRequirement = null; this.InitializeStrategies(); }
public string ChangeManagementRequirement(params string[] argsStrings) { //ChangeManagementRequirement {energyBalance}|{capitalBalance}|{garbageType} var energyBalance = double.Parse(argsStrings[0]); var capitalBalance = double.Parse(argsStrings[1]); var typeString = argsStrings[2]; var wasteType = GetWasteType(typeString); var newManagementRequirement = new ManagementRequirement(energyBalance, capitalBalance, wasteType); this.managementRequirement = newManagementRequirement; return($"Management requirement changed!"); }
public void ChangeManagementRequirement(IManagementRequirement managementRequirement) { this.ManagementRequirement = managementRequirement; }