Question: USING JAVA You will create one class that has two methods: main() and applyInterest(). main() reads the test data values and prints the results. You
USING JAVA
You will create one class that has two methods: main() and applyInterest(). main() reads the test data values and prints the results. You may want to do this in a loop. applyInterest() does not read data values or print the results. Here is a description of applyInterest(): /** * Update the balance with the interest earned after a specified * number of years. The interest is compounded yearly. * * @param balance staring account balance * @param annualInterestRate annual interest rate (ie .055 is 5.5%) * @param numYears number of years * @return the updated balance. */ private static double applyInterest(double balance, double annualInterestRate, int numYears)
Write a method that computes the balance of a bank account with a given initial balance and interest rate, after a given number of years. Assume interest is compounded yearly.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
