Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This problem modifies a lab you already did but uses methods in it. Read in starting value in account, yearly interest rate and number of
This problem modifies a lab you already did but uses methods in it. Read in starting value in account, yearly interest rate and number of months Create method called calculateMonthly that gets yearly interest rate and calculates monthly rate and assign it to a monthly interest rate variable - Create a method called Calcinterest and pass the current value in account and monthly interest rate. It should return new amount in the savings account Create loop that executes the number of months and calls the method each month returning the new value in the account - When loop is done print the amount in the account Test it for 4 months with starting value of $100 and 12% yearly rate. Should get same result as previous lab -Also test it for 3 months with 0% yearly interest rate
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