Got answer.

Printable View

- 02-13-2011, 03:55 AMcodingChanging balance variable so its never negative
Got answer.

- 02-13-2011, 05:00 AMNRitH
This is very straightforward. Each pf those methods can change the balance, right? In each case, add or subtract the method argument to or from the current balance. If Math.max(balance, intendedBalance) == balance, then set balance to 0; otherwise, set it to the intended balance.

- 02-13-2011, 05:59 AMcoding
Could you clarify taht a lot better? I'm still kind of confused.