public class BankRoll extends Object
Modifier and Type | Field and Description |
---|---|
private Integer |
money
The amount of money this BankRoll contains
|
Modifier and Type | Method and Description |
---|---|
void |
deposit(Integer newMoney)
Add money to bank roll
|
Integer |
getBalance()
Retrieve this agent's bank roll
|
void |
setBalance(Integer money)
Set this agent's bank roll
|
void |
withdraw(Integer money)
Subtract money from bank roll
|
private Integer money
public BankRoll()
public BankRoll(Integer money)
public void setBalance(Integer money)
money
- public Integer getBalance()
public void deposit(Integer newMoney)
newMoney
- public void withdraw(Integer money)
newMoney
-