FORMULA IS PMT= P(i(1+i)^n/(1+i)^n-1) Instructions: Write a Java program that implements the following tasks: 1. Prompt the
Fantastic news! We've Found the answer you've been seeking!
Question:
FORMULA IS PMT= P(i(1+i)^n/(1+i)^n-1)
Transcribed Image Text:
Instructions: Write a Java program that implements the following tasks: 1. Prompt the user for the following information about a loan: a. Interest Rate b. Loan Amount C. Number of payments 2. Calculate the monthly payment for the loan, using the following formula: Formula for Fixed Loan Repayment PMT == Fixed Principal & Interest Payment Per Period P = initial loan (principal) amount i = interest rate per period n = number of payment periods Note: You will need to use the Math.pow() method to implement this formula. 3. Display a loan summary as illustrated on the sample runs below: Sample program run #1: Enter monthly interest rate: 0.01 Enter loan amount: 10000 Enter number of payments: 36 Loan Summary ============ Loan amount: $10000.0 Monthly interest rate: 0.01 Number of payments: 36 Monthly payment: $332.14309812851167 Amount paid back: $11957. 15153262642 Interest paid: $1957.1515326264198 Sample program run #2: Enter monthly interest rate: Enter loan amount: 5000 Enter number of payments: 24 Loan Summary Loan amount: $5000.0 Monthly interest rate: 0.02 Number of payments: 24 0.02 Monthly payment: $264.3554862662493 Amount paid back: $6344.5316703899825 Interest paid: $1344.5316703899825 Additional Requirements: 1. Program Description: your program must include a brief description of what it does, placed at the top of your code as a comment line. One sentence is usually enough, for example: // This program calculates the area of a circle given a radius entered by the user. 2. Course Coding Conventions. Organizations adopt program coding standards to facilitate code reuse and maintenance. In this course, we will start using these coding conventions: a. Variable names must use camel case; do not use underscore for multi-word variable naming. See this page for details: Camel case - Wikipedia. Example: use loan Amount instead of loan_amount for a variable name. b. Constants naming. use all uppercase letter names, separating words using underscore. Example: use TAX RATE instead of tax rate or tax Rate for a constant name. Instructions: Write a Java program that implements the following tasks: 1. Prompt the user for the following information about a loan: a. Interest Rate b. Loan Amount C. Number of payments 2. Calculate the monthly payment for the loan, using the following formula: Formula for Fixed Loan Repayment PMT == Fixed Principal & Interest Payment Per Period P = initial loan (principal) amount i = interest rate per period n = number of payment periods Note: You will need to use the Math.pow() method to implement this formula. 3. Display a loan summary as illustrated on the sample runs below: Sample program run #1: Enter monthly interest rate: 0.01 Enter loan amount: 10000 Enter number of payments: 36 Loan Summary ============ Loan amount: $10000.0 Monthly interest rate: 0.01 Number of payments: 36 Monthly payment: $332.14309812851167 Amount paid back: $11957. 15153262642 Interest paid: $1957.1515326264198 Sample program run #2: Enter monthly interest rate: Enter loan amount: 5000 Enter number of payments: 24 Loan Summary Loan amount: $5000.0 Monthly interest rate: 0.02 Number of payments: 24 0.02 Monthly payment: $264.3554862662493 Amount paid back: $6344.5316703899825 Interest paid: $1344.5316703899825 Additional Requirements: 1. Program Description: your program must include a brief description of what it does, placed at the top of your code as a comment line. One sentence is usually enough, for example: // This program calculates the area of a circle given a radius entered by the user. 2. Course Coding Conventions. Organizations adopt program coding standards to facilitate code reuse and maintenance. In this course, we will start using these coding conventions: a. Variable names must use camel case; do not use underscore for multi-word variable naming. See this page for details: Camel case - Wikipedia. Example: use loan Amount instead of loan_amount for a variable name. b. Constants naming. use all uppercase letter names, separating words using underscore. Example: use TAX RATE instead of tax rate or tax Rate for a constant name.
Expert Answer:
Answer rating: 100% (QA)
Heres a Java program that implements the tasks you described import javautilScanner public class Loa... View the full answer
Related Book For
Intermediate Algebra
ISBN: 9780134895987
13th Edition
Authors: Margaret Lial, John Hornsby, Terry McGinnis
Posted Date:
Students also viewed these programming questions
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
Let r and s be solutions to the quadratic equation x 2 b x + c = 0. For n N, define d0 = 0 d1 = r s dn = b dn1 c dn2 (n 2) Prove that dn = r n s n for all n N. [4 marks] (b) Recall that a commutative...
-
This short exercise demonstrates the similarity and the difference between two ways to acquire plant assets. i (Click the icon to view the cases.) Compare the balances in all the accounts after...
-
Object A has a mass m, object B has a mass 4m, and object C has a mass m/4. Rank these objects in order of increasing momentum, given that they all have the same kinetic energy. Indicate ties where...
-
What is the goal of robust optimization?
-
Consider the IRR and ERR measures of worth. If we define a root to mean a value for the measure that results in \(\mathrm{PW}=0\), then which of the following statements is true? a. Both IRR and ERR...
-
On December 1, 2014, Jurczyk Distributing Company had the following account balances. During December, the company completed the following summary transactions. Dec. 6 Paid $1,600 for salaries and...
-
10. Label and explain in details the following diagram A 12. 1 Give three functions of E. Zinc E B + C D Copper 13. Give an ideal principle of predicting a performance of a fuel cell and give an...
-
(a) A disk of mass M and radius R is held up by a massless string, as shown in Fig. The surface of the disk is frictionless. What is the tension in the string? What is the normal force per unit...
-
5)The following data available for Delicious Catering Ltd. Account Beginning balance Ending Balance Use/source of cash Accounts payable 47,800 55,500 Inventory 22,600 29,700 Long term debts 85,500...
-
Sound is produced by which of the following? Electrical currents moving through the air Vibrating objects pushing against air molecules Light bouncing off an object in the environment The emission of...
-
A projectile is launched straight up at 69 m/s from a height of 71 m, at the edge of a sheer cliff. The projectile falls just missing the cliff and hitting the ground below. (a) Find the maximum...
-
Create an interactive program that asks the user about their current investments and calculates the total return. How many shares of DOGE do you own? How many shares of IBM do you own? How many...
-
Consider what you've learned about your discourse community in the healthcare field. Share what you've learnedabout your discourse community and specifically about discourse in healthcare.
-
If = 28 + 11 and b = 4 - 3, what is the angle between vector a b and the y axis? A) 30.3 B) 149.7 D) 210.3 E) 59.7 C) 120.3
-
Explain why a resort hotel that is the only one in the area would or would not be likely to practice social responsibility. Do you think such a resort hotel might act differently if it were only one...
-
Eleni Cabinet Company sold 2,200 cabinets during 2011 at $160 per cabinet. Its beginning inventory on January 1 was 130 cabinets at $56. Purchases made during the year were as follows: February . 225...
-
Rationalize each denominator. Assume that all variables represent positive real numbers and that no denominators are 0. 3 4+ 5
-
Use the graph at the right to predict the value of (t) for the given value of t. t = 60 f(t) 24 16 80 0 5... H CO .... LO THE ....60 -t
-
The movie Transformers: The Last Knight in DVD was on sale for $16.17. The list price (full price) of this disc was $17.99. To the nearest tenth, what was the percent discount?
-
Consider the electrical circuit shown below where \(v_{i}(t)=\beta\), for \(t \geq 0\). Find the dynamic system response \(v_{o}(t)\). VC C ww R V;(t) R ww R3 A First-Order Electrical System Vo (t) +
-
Find the dynamic system response for the spring mass damping system shown in Figure 3.2, where \(f(t)=\beta, x(0)=0\) (i.e. there is no initial energy stored). b f(t) k Figure 3.2 A first-order...
-
Consider a first-order system with a forcing function \(f(t)\) such that input-output differential equation is given by \[\begin{equation*}\dot{y}+3 y=f(t) \text {, } \tag{3.7}\end{equation*}\] where...
Study smarter with the SolutionInn App