Package src

Class Transaction

java.lang.Object
src.Transaction

public class Transaction extends Object
this class holds the transaction log of all the users and also customer data needed for generating a bank statment for a user
  • Field Details

    • accountHolder

      protected Customer accountHolder
  • Constructor Details

    • Transaction

      public Transaction()
  • Method Details

    • setInformation

      public void setInformation(Customer accountHolder)
      A setter to set all the information for the transaction. Does not set the Dictionary for current balance, that will be set when generating the bank statement
      Parameters:
      accountHolder - a customer object that will be used to set all the attribtues besides the currentBalance and transactions
    • setCurrentBalance

      public void setCurrentBalance(Customer accountHolder)
      sets the current balance is going to be used when settint the current balance dictionary. this is going to be used when generating the bank statment
      Parameters:
      accountHolder - to get the currentBalance
    • addTransactionEntry

      public void addTransactionEntry(String entry)
      add an entry to the transaction log
      Parameters:
      entry - the log that is going to be inserted into the transactions list