예제 #1
0
        public override bool ProcessNode(int amount)
        {
            int processableAmount = amount % 500;

            if (processableAmount > 0)
            {
                return(NextNode != null?NextNode.ProcessNode(processableAmount) :  false);
            }
            return(true);
        }
예제 #2
0
        public bool ProcessNode2(int amount)
        {
            int processableAmount = amount % Denomination;

            if (processableAmount > 0)
            {
                return(NextNode.ProcessNode(processableAmount));
            }
            return(true);
        }
예제 #3
0
        public override bool ProcessNode(int amount)
        {
            int processableAmount = amount % 2000;

            if (processableAmount > 0)
            {
                return(NextNode.ProcessNode(processableAmount));
            }

            return(true);
        }