mmayoub

Bank, Bankable interface

Aug 10th, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.68 KB | None | 0 0
  1. package BankInterfaces;
  2.  
  3. import java.time.LocalDate;
  4.  
  5. import BankAccounts.Account;
  6. import BankAccounts.LoanableAccount;
  7. import BankClients.Client;
  8. import BankPkg.AccountType;
  9.  
  10. public interface Bankable {
  11.     // Clients methods
  12.     boolean addClient(Client aClient);
  13.  
  14.     boolean addClient(String clientName, int clientId, LocalDate birthDate);
  15.  
  16.     boolean UpdateClientName(int clientId, String clientName);
  17.  
  18.     boolean RemoveClient(int clientId);
  19.  
  20.     Client getClient(int clientId);
  21.  
  22.     // Clients Array methods
  23.     Client[] getClients(String clientName);
  24.  
  25.     Client[] getClients(LocalDate birthDate);
  26.  
  27.     Client[] getClientsAtAge(LocalDate atDate, int minAge, int maxAge);
  28.  
  29.     // accounts methods
  30.     int addAccount(int ownerId, AccountType type);
  31.  
  32.     boolean removeAccount(int accountId);
  33.  
  34.     Account getAccount(int accountId);
  35.  
  36.     // update an account
  37.     boolean setAccountFee(int accountId, double customFee);
  38.  
  39.     boolean setAccountFee(int accountId);
  40.  
  41.     boolean setAccountCredit(int accountId, int customCredit);
  42.  
  43.     boolean setAccountCredit(int accountId);
  44.  
  45.     boolean withdraw(int accountId, double amount);
  46.  
  47.     boolean deposit(int accountId, double amount);
  48.  
  49.     // get accounts list
  50.     Account[] getAccounts();
  51.  
  52.     Account[] getClientAccounts(int clientId);
  53.  
  54.     Account[] getAccountsByType(AccountType type);
  55.  
  56.     Account[] getInvalidAgeAccounts(LocalDate aDate);
  57.  
  58.     Account[] getAccountsByBalance(int minBalance, int maxBalance);
  59.  
  60.     Account[] getAccountsByBalance(double minUseage, int maxUseage);
  61.  
  62.     // accounts with loans
  63.     boolean giveLoan(int accountId, double amount, int payments);
  64.  
  65.     boolean loanPaymentReturn(int accountId);
  66.  
  67.     LoanableAccount[] getLoans();
  68.  
  69.     boolean setLoanFee(double loanFee);
  70.  
  71. }
Add Comment
Please, Sign In to add comment