diff --git a/AccountArray.java b/AccountArray.java index f05ebb5..3c2deb4 100644 --- a/AccountArray.java +++ b/AccountArray.java @@ -13,8 +13,7 @@ public class AccountArray { Account m_Src = m_AccountArray.get(Src); Account m_Des = m_AccountArray.get(Des); - if(m_Src.getBalance()-Amount>0){ - m_Src.withdraw(Amount); + if(m_Src.withdraw(Amount)){ m_Des.credit(Amount); } }