Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Java program called Methods contained in 1 Java source file that contains 2 methods named calculateBalance and reverseString that take and return values
Write a Java program called Methods contained in 1 Java source file that contains 2 methods named calculateBalance and reverseString that take and return values and produces the output below. The calculateBalance method will calculate the yearly balance of a bank savings account each year for 5 years given a starting principle, the interest rate, and a yearly deposit amount. The method should accept these values as parameters and return the account balance 5 year period. The formula to use for the ending balance for a single year is principle (1+rate) yearly deposit. The starting balance for the first year is just the initial principle (i.e. nitial deposit amount) The reverse String method will simply take a string value (we assume not null) and return a string value that is the reverse of the in For example if we take This" the method would return "sihT" Hint: Your main method should call calculateBalance like this: System. out. rintln "New balance calculate Balance rinciple rate earl deposit) Hint: Your main method should call reverse Strin like this: System. out. rintln "Reverse of str1 reverse String (strl) Note: in the output below, replace "Student Name" with your actual name Things that will cost you points (not necessarily a comprehensive list) doesn't compile doesn't produce correct output doesn't contain methods that take and return values hard-coded (non-calculated) output uses if-statement(s) uses extra un-needed variables file/class/methods named incorrectly hard to read indentation
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