Package angry3vilbot.bankingapp
Class User
java.lang.Object
angry3vilbot.bankingapp.User
User class represents a user in the system.
It contains user information such as card number, name, balance,
jar IDs, transaction IDs, deposit requests, transactions, and jars.
It also includes a flag to indicate if the user has acknowledged a message about their jar(s) reaching their goal(s).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanFlag indicating if the user has acknowledged the message about their jar(s) reaching their goal(s).private doubleThe balance of the user.private BigDecimalThe card number of the user.private BigDecimal[]Array of jar IDs for jars associated with the user.private Jar[]Array ofJarobjects for jars associated with the user.private StringThe name of the user.private DepositRequest[]Array ofDepositRequestobjects for deposit requests associated with the user.private BigDecimal[]Array of transaction IDs of transactions associated with the user.private Transaction[]Array ofTransactionobjects for transactions associated with the user. -
Constructor Summary
ConstructorsConstructorDescriptionUser(BigDecimal cardnumber, String name, double balance, BigDecimal[] jarIds, BigDecimal[] transactionIds, DepositRequest[] requests, Transaction[] transactions, Jar[] jars, boolean acknowledgedJarGoalMsg) Constructs a User object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets a boolean value that shows whether the user has acknowledged the jar goal message or not.doubleGets the user's balance.Gets the user's card number.Gets the jar IDs associated with the user.Jar[]getJars()Gets the jars associated with the user.getName()Gets the name of the user.Gets the deposit requests associated with the user.Gets the transactions associated with the user.voidsetAcknowledgedJarGoalMsg(boolean confirmed) Sets if the user has acknowledged the jar goal message or not.
-
Field Details
-
cardnumber
The card number of the user. -
name
The name of the user. -
balance
private double balanceThe balance of the user. -
jarIds
Array of jar IDs for jars associated with the user. -
jars
Array ofJarobjects for jars associated with the user. -
transactionIds
Array of transaction IDs of transactions associated with the user. -
requests
Array ofDepositRequestobjects for deposit requests associated with the user. -
transactions
Array ofTransactionobjects for transactions associated with the user. -
acknowledgedJarGoalMsg
private boolean acknowledgedJarGoalMsgFlag indicating if the user has acknowledged the message about their jar(s) reaching their goal(s).
-
-
Constructor Details
-
User
public User(BigDecimal cardnumber, String name, double balance, BigDecimal[] jarIds, BigDecimal[] transactionIds, DepositRequest[] requests, Transaction[] transactions, Jar[] jars, boolean acknowledgedJarGoalMsg) Constructs a User object.- Parameters:
cardnumber- the card number of the username- the name of the userbalance- the balance of the userjarIds- the IDs of the jars associated with the usertransactionIds- the IDs of the transactions associated with the userrequests- the deposit requests associated with the usertransactions- the transactions associated with the userjars- the jars associated with the useracknowledgedJarGoalMsg- a flag indicating if the user has acknowledged the jar goal message
-
-
Method Details
-
getCardnumber
Gets the user's card number.- Returns:
- the card number of the user
-
getName
Gets the name of the user.- Returns:
- the name of the user
-
getBalance
public double getBalance()Gets the user's balance.- Returns:
- the balance of the user
-
getJars
Gets the jars associated with the user.- Returns:
- the array of
Jarobjects for jars associated with the user
-
getJarIds
Gets the jar IDs associated with the user.- Returns:
- the array of jar IDs associated with the user
-
getTransactions
Gets the transactions associated with the user.- Returns:
- the array of
Transactionobjects for transactions associated with the user
-
getRequests
Gets the deposit requests associated with the user.- Returns:
- the array of
DepositRequestobjects for deposit requests associated with the user
-
getAcknowledgedJarGoalMsg
public boolean getAcknowledgedJarGoalMsg()Gets a boolean value that shows whether the user has acknowledged the jar goal message or not.- Returns:
trueif the user has acknowledged the jar goal message,falseotherwise.
-
setAcknowledgedJarGoalMsg
public void setAcknowledgedJarGoalMsg(boolean confirmed) Sets if the user has acknowledged the jar goal message or not.- Parameters:
confirmed-trueif the user has acknowledged the jar goal message,falseotherwise.
-