Class SingleAccount

java.lang.Object
makingtransactions.bankaccounts.BankAccount
makingtransactions.bankaccounts.SingleAccount

public class SingleAccount extends BankAccount
A bank account class for creating a single account containing only one holder.
  • Constructor Details

    • SingleAccount

      public SingleAccount(User userHolder, double balance, String accountName, String currency, int transitNumber, int institutionNumber, int accountNumber)
      Create a single account with a balance.
      Parameters:
      userHolder - The account holder.
      balance - The balance of the account.
      accountName - The name of the account.
      currency - The type of currency.
      transitNumber - The transit number.
      institutionNumber - The institution number.
      accountNumber - The account number.
    • SingleAccount

      public SingleAccount(User userHolder, String accountName, String currency, int transitNumber, int institutionNumber, int accountNumber)
      Create a single account without a balance.
      Parameters:
      userHolder - The account holder.
      accountName - The name of the account.
      currency - The type of currency.
      transitNumber - The transit number.
      institutionNumber - The institution number.
      accountNumber - The account number.
  • Method Details

    • getUserHolder

      public User getUserHolder()
      Get the holder of the bank account.
      Returns:
      The holder of the account.
    • setUserHolder

      public void setUserHolder(User userHolder)
      Set the holder of the account.
      Parameters:
      userHolder - The account holder.