Package makingtransactions.bankaccounts
Class SingleAccount
java.lang.Object
makingtransactions.bankaccounts.BankAccount
makingtransactions.bankaccounts.SingleAccount
A bank account class for creating a single account containing only one
holder.
-
Constructor Summary
ConstructorsConstructorDescriptionSingleAccount
(User userHolder, double balance, String accountName, String currency, int transitNumber, int institutionNumber, int accountNumber) Create a single account with a balance.SingleAccount
(User userHolder, String accountName, String currency, int transitNumber, int institutionNumber, int accountNumber) Create a single account without a balance. -
Method Summary
Modifier and TypeMethodDescriptionGet the holder of the bank account.void
setUserHolder
(User userHolder) Set the holder of the account.Methods inherited from class makingtransactions.bankaccounts.BankAccount
addTransaction, getAccountName, getAccountNumber, getBalance, getCurrency, getInstitutionNumber, getTransactions, getTransitNumber, setAccountName, setAccountNumber, setBalance, setCurrency, setInstitutionNumber, setTransitNumber, toString
-
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
Get the holder of the bank account.- Returns:
- The holder of the account.
-
setUserHolder
Set the holder of the account.- Parameters:
userHolder
- The account holder.
-