Class User

java.lang.Object
angry3vilbot.bankingapp.User

public class User extends Object
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 Details

    • cardnumber

      private BigDecimal cardnumber
      The card number of the user.
    • name

      private String name
      The name of the user.
    • balance

      private double balance
      The balance of the user.
    • jarIds

      private BigDecimal[] jarIds
      Array of jar IDs for jars associated with the user.
    • jars

      private Jar[] jars
      Array of Jar objects for jars associated with the user.
    • transactionIds

      private BigDecimal[] transactionIds
      Array of transaction IDs of transactions associated with the user.
    • requests

      private DepositRequest[] requests
      Array of DepositRequest objects for deposit requests associated with the user.
    • transactions

      private Transaction[] transactions
      Array of Transaction objects for transactions associated with the user.
    • acknowledgedJarGoalMsg

      private boolean acknowledgedJarGoalMsg
      Flag 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 user
      name - the name of the user
      balance - the balance of the user
      jarIds - the IDs of the jars associated with the user
      transactionIds - the IDs of the transactions associated with the user
      requests - the deposit requests associated with the user
      transactions - the transactions associated with the user
      jars - the jars associated with the user
      acknowledgedJarGoalMsg - a flag indicating if the user has acknowledged the jar goal message
  • Method Details

    • getCardnumber

      public BigDecimal getCardnumber()
      Gets the user's card number.
      Returns:
      the card number of the user
    • getName

      public String 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

      public Jar[] getJars()
      Gets the jars associated with the user.
      Returns:
      the array of Jar objects for jars associated with the user
    • getJarIds

      public BigDecimal[] getJarIds()
      Gets the jar IDs associated with the user.
      Returns:
      the array of jar IDs associated with the user
    • getTransactions

      public Transaction[] getTransactions()
      Gets the transactions associated with the user.
      Returns:
      the array of Transaction objects for transactions associated with the user
    • getRequests

      public DepositRequest[] getRequests()
      Gets the deposit requests associated with the user.
      Returns:
      the array of DepositRequest objects 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:
      true if the user has acknowledged the jar goal message, false otherwise.
    • setAcknowledgedJarGoalMsg

      public void setAcknowledgedJarGoalMsg(boolean confirmed)
      Sets if the user has acknowledged the jar goal message or not.
      Parameters:
      confirmed - true if the user has acknowledged the jar goal message, false otherwise.