Methods Summary |
---|
public void | credit(float amount)
float currentBalance = balance;
process(amount);
this.balance = currentBalance+amount;
|
public void | debit(float amount)
float currentBalance = balance;
process(amount);
this.balance = currentBalance-amount;
|
public float | getBalance()
return balance;
|
public void | process(float ll)
try {
Thread.sleep((long)ll);
}
catch (Exception e)
{
System.out.println(e);
}
|
public java.lang.String | toString()
return new StringBuffer("Balance: $").append(this.balance).toString();
|