COMP2396
Loading...
Searching...
No Matches
BankAccount Class Reference
Collaboration diagram for BankAccount:

Public Member Functions

int getBalance ()
 
void withdraw (int amount)
 

Private Attributes

int balance = 100
 

Detailed Description

Definition at line 1 of file BankAccount.java.

Member Function Documentation

◆ getBalance()

int BankAccount.getBalance ( )
inline

Definition at line 3 of file BankAccount.java.

3{ return balance; }

References balance.

Referenced by SmithJob.makeWithdrawal().

Here is the caller graph for this function:

◆ withdraw()

void BankAccount.withdraw ( int amount)
inline

Definition at line 4 of file BankAccount.java.

4 {
5 balance = balance - amount;
6 }

References balance.

Referenced by SmithJob.makeWithdrawal().

Here is the caller graph for this function:

Member Data Documentation

◆ balance

int BankAccount.balance = 100
private

Definition at line 2 of file BankAccount.java.

Referenced by getBalance(), and withdraw().


The documentation for this class was generated from the following file: