Package bank.exceptions
Class BalanceTooLowException
java.lang.Object
java.lang.Throwable
java.lang.Exception
bank.exceptions.BankAccountException
bank.exceptions.BalanceTooLowException
- All Implemented Interfaces:
Serializable
Balance is lower than amount being withdrawn.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class bank.exceptions.BankAccountException
getAccountMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BalanceTooLowException
public BalanceTooLowException(int account, double balance, double amount)- Parameters:
account-balance-amount-
-
-
Method Details
-
getBalance
public double getBalance()- Returns:
- the balance
-
getAmount
public double getAmount()- Returns:
- the invalid amount
-