public override bool ProcessNode(int amount) { int processableAmount = amount % 500; if (processableAmount > 0) { return(NextNode != null?NextNode.ProcessNode(processableAmount) : false); } return(true); }
public bool ProcessNode2(int amount) { int processableAmount = amount % Denomination; if (processableAmount > 0) { return(NextNode.ProcessNode(processableAmount)); } return(true); }
public override bool ProcessNode(int amount) { int processableAmount = amount % 2000; if (processableAmount > 0) { return(NextNode.ProcessNode(processableAmount)); } return(true); }