> In java how would I add $2 to an account balance everytime the balance goes $1 over -$100. I'm assuming it would be

In java how would I add $2 to an account balance everytime the balance goes $1 over -$100. I'm assuming it would be

Posted at: 2014-12-18 
I don't know java, but I know C and for this, my psuedocode would be:

while ( "my program is running") {

if ( balance <= 101.00 ) {

balance = balance + 2.00;

}

----- the rest of my program -----------

}

UPDATE: my comment didn't work right so here is 'slightly' better formatting.

-- check for an overdraft

if (balance <= -101.00) {

fee = 2 * ( -101.00 - balance );

}