コード例 #1
0
ファイル: CLowInterest.cs プロジェクト: PUT-MiASI-106133/bank
        public decimal capitalize(CAccount acc)
        {
            decimal temp = acc.GetSaldo();

            temp += temp * this.interest;
            return(temp);
        }
コード例 #2
0
        public bool WithDraw(CBank bank, CAccount acc, decimal amount)
        {
            bool       positive = false;
            WithDraw   withdraw = new WithDraw(amount, acc);
            IOperation oper     = withdraw;

            if (acc.GetSaldo() >= amount)
            {
                acc.DoOperation(oper);
                acc.GetHistory().AddToHistory(withdraw);
                positive = true;
            }
            return(positive);
        }