Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Bank

Class representing a bank

Hierarchy

  • Bank

Index

Constructors

constructor

  • new Bank(name: string): Bank

Properties

accounts

accounts: BankAccount[] = []

name

name: string

Methods

account

  • Retrieves an account by its account number

    throws
    • Error if no account is found with the provided account number

    Parameters

    • number: string

      The account number of the account to retrieve

    Returns BankAccount

    • The bank account with the provided account number

accountHoldings

  • accountHoldings(person: Person): number
  • Retrieves the sum of all positive balances from the user's bank accounts.

    Parameters

    • person: Person

      The person whose account holdings are to be retrieved

    Returns number

    The sum of all positive balances of the user's bank accounts

addAccount

interestCalculations

  • interestCalculations(): void

removeAccount

Generated using TypeDoc