Пример #1
0
 public void TakeDeposit(Costomer costomer)
 {
     if (costomer.freeMoneyForDep > 0)
     {
         this.AllDeposits        += costomer.freeMoneyForDep;
         costomer.Deposits        = costomer.freeMoneyForDep;
         costomer.freeMoneyForDep = 0;
     }
 }
Пример #2
0
 public void  GiveCredit(Costomer costomer)
 {
     if (costomer.PayingCapacity == true)
     {
         costomer.Credits       = costomer.needForCredit;
         this.AllCredits       += costomer.Credits;
         costomer.needForCredit = 0;
     }
 }
Пример #3
0
        public static void Main(string[] args)
        {
            Costomer Simon = new Costomer();

            Simon.CostName        = "Simon Kirakosyan";
            Simon.freeMoneyForDep = 30000;
            Simon.totalActivs     = 160000;
            Simon.needForCredit   = 40000;
            Bank Convers = new Bank();

            Convers.GiveCredit(Simon);
            Convers.TakeDeposit(Simon);
            PrintState(Simon);
            Console.Read();
        }
Пример #4
0
 static void PrintState(Costomer Simon)
 {
     Console.WriteLine("Costomer {0} get your {1} credit and Thank You for {2} deposit", Simon.CostName, Simon.Credits, Simon.Deposits);
 }