Homework 5: Recursion Problems
Due Thurs, Feb 14, 9:55 AM
Write Java code for each of the following problems:
- Write a recursive method to print each element of an array of double. Pass the
array to the method as a parameter.
- Write a recursive method to calculate and return the sum of the values stored in
an array of double. Pass the array as a parameter.
- Write a recursive method, reverse(String):String that
returns the reverse of its string parameter. So, reverse("bad")
should return "dab".
How To Submit
- Bring your solutions to class. We'll go over the answers in class.
NOTE: This homework assignment may be collected.