Question: JAVA QUESTION (simple recursive practice problems) Write a main method that invokes each of these methods- use a variety of input to make sure you

JAVA QUESTION (simple recursive practice problems)  JAVA QUESTION (simple recursive practice problems) Write a main method that

Write a main method that invokes each of these methods- use a variety of input to make sure you account for all conditions. 1. public static double investmentValue(double amount, double interest, int oumYears) Write a recursive method that takes as parameters an initial investment amount, an annual interest rate, and a number of years. The method should return the value of the investment after the given number of years, assuming that the interest is compounded annually. (For example, if the initial investment is 1000 and the interest rate is 10 percent, then after one year the investment will be worth 1100, after two years 1210, after three years 1331, etc 2. public static String changePi(String str) Given a string, compute recursively (no loops) a new string where all appearances of "pi" have been replaced by "3.14". changePi("Xpix") %2.14x" changePi("pipi") >"3.143.14" changePK"pip")-) "3.14p

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!