Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Accountable Interface
- * That is the customer requirements from us
- * Do not change it without customer confirmation
- */
- package BankInterfaces;
- import BankExceptions.BankNoCreditException;
- import BankPkg.AccountType;
- public interface Accountable {
- /*
- * return the total number of accounts in the bank
- */
- int getTotalAccount();
- /*
- * return the number of accounts from a given type: regular, teenage,
- * business,student as defined in AccountType.java
- */
- int getTotalAccountByType(AccountType type);
- /* *********************************************
- * select an account to run the coming methods *
- * *********************************************
- */
- /*
- * get the balance of selected bank account
- */
- double getBalance();
- /*
- * take money out of selected bank account return true if there is enough
- * funds, false otherwise
- */
- boolean withDraw(double amount) throws BankNoCreditException;
- /*
- * put an amount of money in selected account
- */
- void deposit(double amount);
- /*
- * set fee for selected bank account
- */
- boolean setAccountFee(double fee); // personal fee, or -1 for default fee
- /*
- * get fee for selected bank account
- */
- double getAccountFee();
- /*
- * set credit for selected bank account
- */
- public boolean setAccountCredit(int customCredit);
- /*
- * set credit to default for selected bank account
- */
- public boolean setAccountCredit();
- /*
- * get the account number for the selected account
- */
- int getAccountNumber(); // regular start with 1, teenage start with 2,
- // business start with 3, student start with 4
- }
Add Comment
Please, Sign In to add comment