Question
1. Write a Java program named InterestCalculator.java that calculates the value of a bank account based on starting principle, interest rate and time. 2. The
1. Write a Java program named InterestCalculator.java that calculates the value of a bank account based on starting principle, interest rate and time.
2. The program must
a. Prompt the user for
i. Number of quarters to display (int) that is greater than zero and less or equal to 10.
ii. Starting balance (double) that is greater than zero.
iii. Interest rate (double) that is greater than zero and less than or equal to 20%
b. Display the information the user entered and ask if it is correct. If so continue, if not ask for all the information again (loop and half example in Addition Iteration examples).
c. Calculate the ending balance for each quarter and display the results in a table similar to below, the formula for quarterly balance is b + (b * IR/100 * .25) where b is starting balance and IR is interest rate :
d. If the user enters a value outside the boundaries listed above, prompt them with an error message and ask for the value again(Loops). See sample run below:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started