Question: Recursion For this assignment, you will write two recursive functions, both of which will parse any length string that consists of digits and numbers. Both

Recursion
For this assignment, you will write two recursive functions, both of which will parse any length string that consists of digits and numbers. Both functions should be in the same class and have the following signatures. Make sure you follow the UML exactly, as I will be running unit tests on your submission using this interface.
1. Write a recursive function that will add up the digits in the string. Example inputs and results:
input string result
"1d2d3d"6
"55"10
"xx"0
2. Write a recursive function that will find the largest integer in this string. Some Examples:
input string result
"12x8"12
"012x88"88
"012x88ttttt9xe33ppp100"100
Recursion For this assignment, you will write two

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 Programming Questions!