Interface AccountObserver

All Known Subinterfaces:
AccountAuditor
All Known Implementing Classes:
GlobalAccountObserver, GovernmentAccountAuditor

public interface AccountObserver
A class which facilitates the observance of transactions within economy accounts.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deposited(Account account, double amount, String reason)
    Called whenever an account money is deposited to an account.
    void
    withdrew(Account account, double amount, String reason)
    Called whenever an account money is withdrawn from an account.
  • Method Details

    • withdrew

      void withdrew(Account account, double amount, String reason)
      Called whenever an account money is withdrawn from an account.
      Parameters:
      account - The account withdrew from.
      amount - The amount withdrew.
      reason - The reason for withdrawing.
    • deposited

      void deposited(Account account, double amount, String reason)
      Called whenever an account money is deposited to an account.
      Parameters:
      account - The account deposited to.
      amount - The amount deposited.
      reason - The reason for depositing.