Financial Application:• Write a program that computes future investment value at a given interest rate for aspecified number of months and prints the report shown in the sample output. • Given the annual interest rate, the interest amount earned each month is computedusing the formula: Interest earned = investment amount * annual interest rate /1200 (=months * 100) • Write a method, computeFutureValue, which receives the investment amount, annualinterest rate and number of months as parameters and does the following: o Prints the interest amount earned each month and the new value of theinvestment (hint: use a loop). o Returns the total interest amount earned after the number of months specified bythe user. The main method will:o Ask the user for all input needed to call the computeFutureValue method.o Call computeFutureValueo Print the total interest amount earned by the investment at the end of thenumber of months entered by the user. Sample Program runningEnter the investment amount10000Enter the annual interest rate5.75Enter the number of months18 Monthly Interest and Investment valueMonth Interest Value===== ======== =====1            $47.92          $10,047.922            $48.15          $10,096.063            $48.38          $10,144.444            $48.61          $10,193.055            $48.84          $10,241.89 6            $49.08          $10,290.977            $49.31          $10,340.288            $49.55          $10,389.829            $49.78          $10,439.6110          $50.02          $10,489.6311          $50.26          $10,539.8912          $50.50          $10,590.4013          $50.75          $10,641.1414          $50.99          $10,692.1315          $51.23          $10,743.3716          $51.48          $10,794.8417          $51.73          $10,846.5718          $51.97          $10,898.54The total interest earned in 12 months is $898.54

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Financial Application:
• Write a program that computes future investment value at a given interest rate for a
specified number of months and prints the report shown in the sample output.

• Given the annual interest rate, the interest amount earned each month is computed
using the formula:

Interest earned = investment amount * annual interest rate /1200 (=months * 100)

• Write a method, computeFutureValue, which receives the investment amount, annual
interest rate and number of months as parameters and does the following:

o Prints the interest amount earned each month and the new value of the
investment (hint: use a loop).

o Returns the total interest amount earned after the number of months specified by
the user.

The main method will:
o Ask the user for all input needed to call the computeFutureValue method.
o Call computeFutureValue
o Print the total interest amount earned by the investment at the end of the
number of months entered by the user.

Sample Program running
Enter the investment amount
10000
Enter the annual interest rate
5.75
Enter the number of months
18

Monthly Interest and Investment value
Month Interest Value
===== ======== =====
1            $47.92          $10,047.92
2            $48.15          $10,096.06
3            $48.38          $10,144.44
4            $48.61          $10,193.05
5            $48.84          $10,241.89

6            $49.08          $10,290.97
7            $49.31          $10,340.28
8            $49.55          $10,389.82
9            $49.78          $10,439.61
10          $50.02          $10,489.63
11          $50.26          $10,539.89
12          $50.50          $10,590.40
13          $50.75          $10,641.14
14          $50.99          $10,692.13
15          $51.23          $10,743.37
16          $51.48          $10,794.84
17          $51.73          $10,846.57
18          $51.97          $10,898.54
The total interest earned in 12 months is $898.54

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 6 steps with 4 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education