All pastes #840405 Raw Edit

Unnamed

public text v1 · immutable
#840405 ·published 2007-12-31 20:29 UTC
rendered paste body
static private void balance() {
		double interestRate;
		double powerResult;
		String strBalance;
		DecimalFormat df = new DecimalFormat("$#.00");
		
		interestRate = INTEREST_RATE / 12.0;
		powerResult = Math.pow( ( 1.0 + interestRate ), ( (double)(paymentsMadeToDate) - (double)(totalNumOfPayments) ) );
		balance = ( MONTHLY_PAYMENT * ( ( 1.0 - powerResult )  / ( interestRate ) ) );
		
		strBalance = Double.toString(balance);
		strBalanceCurFormat = df.format(strBalance);
	}