ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 22 May 2017 My Price 9.00

a floating point value of type double

Design, write in Java, test and document a program that computes the monthly payment and the total payment for a bank loan. The program lets the user enter the loan amount (a floating point value of type double), the loan period (an integer) in number of years, and a range of annual interest rates (two floating point values). The program displays the monthly and total payments for each interest rate within the given range, with an increment of 1/4. For example, if the user enters the loan amount 10000 for five years, with interest rates 5.00% and 8.00%, the program should display a table as follows:

Loan Amount: 10000

Number of Years: 5

Interest Rate

Monthly Payment

Total Payment

5.00%

188.71

11322.74

5.25% 189.85

11391.59

....... ............ ...........

7.75%

201.56

12094.17

8.00%

202.76

12165.83

     

 

The monthly and total repayments are to be displayed correct to two decimal places. The input data is to be validated. If the user enters a zero or negative value, the program should output an appropriate error message and re-prompt for input until the user enters the correct data. Also, be sure to adjust the interest rate for the monthly period. For example, when annual interest rate is 5 percent, then when posting monthly interest rate, you use 5/12 percent. The formula to compute the monthly payment is as follows: monthlyPayment = (loanAmount x monthlyInterestRate) / (1 – (1 / (1 + monthlyInterestRate)numberOfYears x 12 ))

In the above formula, you have to compute (1 + monthlyInterestRate)numberOfYears x 12 ). The pow(a,b) method in the Java API Math class can be used to compute a b.

The program should loop around and allow the user to repeat the above calculations for another set of input data until the user does not want to continue. The program should be well-structured and should have a reasonable set of methods in addition to the main method. It should use a good coding style, proper indentation, meaningful identifier names and appropriate comments throughout. 

Answers

(11)
Status NEW Posted 22 May 2017 05:05 AM My Price 9.00

-----------

Attachments

file 1495431687-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)