Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BankAccount

Abstract class representing a bank account.

abstract

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • Creates a new instance of the BankAccount class.

    throws
    • Account number cannot be empty.

    Parameters

    • accountNumber: string

      The account number of the bank account.

    • holder: Person

      The holder of the bank account.

    Returns BankAccount

Properties

Protected _balance

_balance: number = 0

The balance of the bank account.

Protected _holder

_holder: Person

The holder of the bank account.

accountNumber

accountNumber: string

The account number of the bank account.

Accessors

balance

  • get balance(): number

holder

Methods

applyInterests

  • applyInterests(): void

deposit

  • deposit(amount: number): void
  • Deposits an amount to the bank account.

    Parameters

    • amount: number

      The amount to be deposited.

    Returns void

Generated using TypeDoc