// Accounts Exceptions // // NoName exception - raised when an attempt of create an // unnamed account is made class NoNameException extends Exception { NoNameException() { super (); } NoNameException(String s) { super (s); } } // // NegativeAmount exception - raised when an attempt of making // a negative deposit is made class NegativeAmountException extends Exception { NegativeAmountException() { super (); } NegativeAmountException(String s) { super (s); } } // // MinBalance exception - raised when an attempt of making // a negative deposit is made class MinBalanceException extends Exception { MinBalanceException() { super (); } MinBalanceException(String s) { super (s); } } // // InvalidDeposit exception - raised when an attempt of making // a deposit in a CD account before the end of period class InvalidDepositException extends Exception { InvalidDepositException() { super (); } InvalidDepositException(String s) { super (s); } } // // CDNegativeBalance exception - raised when a negative balance results in a CD account // class CDNegativeBalanceException extends Exception { CDNegativeBalanceException() { super (); } CDNegativeBalanceException(String s) { super (s); } } // // NoExtraCredit exception - raised when a withdrawal is requested // from a Loan account (no extra credit allowed!) class NoExtraCreditException extends Exception { NoExtraCreditException() { super (); } NoExtraCreditException(String s) { super (s); } } // // NoSuchAccount exception - raised when an attemp of fetching an inexistent // account is made class NoSuchAccountException extends Exception { NoSuchAccountException() { super (); } NoSuchAccountException(String s) { super (s); } }