Ejemplo n.º 1
0
 public void transferOUT(int dAmount3, savings savings)
 {
     if (this.initialBalance > dAmount3)
     {
         this.initialBalance    -= dAmount3;
         savings.initialBalance += dAmount3;
         savings.transactions.addTransaction(Enums.TransactionType.TRANSFER, DateTime.Now.Date, dAmount3);
         transactions.addTransaction(Enums.TransactionType.TRANSFER_OUT, DateTime.Now.Date, dAmount3);
     }
     else
     {
         Console.WriteLine("Withraw cancelled: " + Enums.TransactionResult.INSUFFICIENT_FUND);
     }
 }
Ejemplo n.º 2
0
 public user(String name, double initBalance)
 {
     this.Name        = name;
     this.initBalance = initBalance;
     checking         = new checking(getifPrimier());
     savings          = new savings(initBalance, getifPrimier());
     if (savings.initialBalance > 2000)
     {
         primier = Enums.CustomerStatus.PREMIER.ToString();
     }
     else
     {
         primier = Enums.CustomerStatus.REGULAR.ToString();
     }
 }