Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

You want to apply for a loan to buy a house. You understand that you need to pay the interest on a loan accrued on

You want to apply for a loan to buy a house. You understand that you need to pay the interest on a loan accrued on a daily basis. After talking with the bank, you find out there are two different ways you may choose on how to pay off the loan. Long-term loans can be repaid in a series of annual, semi-annual or monthly payments. Payments can be equal total payments or equal principal payments.

When the equal total payment method is used, each payment includes the accrued interest on the unpaid balance, plus some principal. The amount applied toward the principal increases with each payment ( see Table 1 as an example). Here is the details on how to calculate those values in table 1: to calculate the total amount of the periodic payment, the following formula is used:

P = A r 1 ( 1 + r ) N , where

  • A = amount of loan (in table 1, A = 10,000)
  • r = interest rate (in table 1, r = 0.12, which is 12%)
  • P = periodic total payment (in table 1, P = 2013.03 )
  • N = total number of periods or installments in the loan (in table 1, N = 8)

The principal portion due in period n can be calculated using this formula:

C n = P ( 1 + r ) ( 1 + N n ) , where

  • C n is principal portion due (the third column in table 1 )
  • n = period under consideration (the first column in table 1)

The interest due in period n is (the fourth column in table 1 ):

I n = P C n

The remaining principle balance due after period n is (the fifth column in table 1):

R n = I n r C n

The equal principal payment method also provides for payment of accrued interest on the unpaid balance, plus an equal amount of the principal. The total payment declines over time. As the remaining principal balance declines, the amount of interest accrued also declines (see Table 2 as an example). To calculate the values in table 2, the principal portion of the total payment is calculated as (the third column in table 2):

C = A N

The interest due in period n is (the fourth column in table 2):

I n = ( A C n 1 ) r

The remaining principle balance due after period n is (the fifth column in table 2):

R n = I n r C

You need to write a java program to calculate how much you need to pay each pay period and total payment for your loan. You are given a Java program, MyLoanCalculator, to start with. In the given program, implement the following:

  • (2 points) Ask the user to input their loan's details, including loan amount, number of installments, and interest rates (as an example, user should input 0.12 for 12% interest rate).
  • (8 points) Implement the equal total payment method and display the results like table 1.
  • (8 points) Implement the equal principal payment method and display the results like table 2.
  • (2 points) Compare the total payments from the above two methods, and print which method gives you the smaller total amount to pay for your loan.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Accounting questions