Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package BankInterfaces;
- import java.time.LocalDate;
- import BankAccounts.Account;
- import BankAccounts.LoanableAccount;
- import BankClients.Client;
- import BankPkg.AccountType;
- public interface Bankable {
- // Clients methods
- boolean addClient(Client aClient);
- boolean addClient(String clientName, int clientId, LocalDate birthDate);
- boolean UpdateClientName(int clientId, String clientName);
- boolean RemoveClient(int clientId);
- Client getClient(int clientId);
- // Clients Array methods
- Client[] getClients(String clientName);
- Client[] getClients(LocalDate birthDate);
- Client[] getClientsAtAge(LocalDate atDate, int minAge, int maxAge);
- // accounts methods
- int addAccount(int ownerId, AccountType type);
- boolean removeAccount(int accountId);
- Account getAccount(int accountId);
- // update an account
- boolean setAccountFee(int accountId, double customFee);
- boolean setAccountFee(int accountId);
- boolean setAccountCredit(int accountId, int customCredit);
- boolean setAccountCredit(int accountId);
- boolean withdraw(int accountId, double amount);
- boolean deposit(int accountId, double amount);
- // get accounts list
- Account[] getAccounts();
- Account[] getClientAccounts(int clientId);
- Account[] getAccountsByType(AccountType type);
- Account[] getInvalidAgeAccounts(LocalDate aDate);
- Account[] getAccountsByBalance(int minBalance, int maxBalance);
- Account[] getAccountsByBalance(double minUseage, int maxUseage);
- // accounts with loans
- boolean giveLoan(int accountId, double amount, int payments);
- boolean loanPaymentReturn(int accountId);
- LoanableAccount[] getLoans();
- boolean setLoanFee(double loanFee);
- }
Add Comment
Please, Sign In to add comment