2016-08-06 5 views
-1
public void showLoanPayments(View clickedButton) { 

     double loanAmount = Integer.(mLoanAmount.getText().toString()); 
     double interestRate = (Integer.parseInt(mInterestRate.getText().toString())); 
     double loanPeriod = Integer.parseInt(mLoanPeriod.getText().toString()); 
     double r = interestRate/1200; 
     double r1 = Math.pow(r+1,loanPeriod); 

     double monthlyPayment = (double) ((r+(r/(r1-1))) * loanAmount); 
     double totalPayment = monthlyPayment * loanPeriod; 

     mMonthlyPaymentResult.setText(new DecimalFormat("##.##").format(monthlyPayment)); 
     mTotalPaymentsResult.setText(new DecimalFormat("##.##").format(totalPayment)); 
    } 
} 
+0

あなたが問題を解決した場合は、残りの人々が恩恵を受けるように答えを記入してください。 –

答えて

0

今すぐ回答を投稿してください。私はすでに問題を解決しているので、ありがとう。再度、感謝します。

関連する問題