Question: Please post you're code and explain how you came to you're answer. This assignment presents multiple problems that must be solved recursively. While some problems

 Please post you're code and explain how you came to you're

answer. This assignment presents multiple problems that must be solved recursively. While

Please post you're code and explain how you came to you're answer.

This assignment presents multiple problems that must be solved recursively. While some problems might be solved easily with iteration the goal is to get a sense of solving problems recursively. Each problem has an accompanying class file that contains tests to validate your solution as well as the method or methods to implement for each problem. You may implement any additional helper methods to help you solve the problem so long as iteration is not used except where specified. You may not change the initial method header. Problem 2 - Count Element (15 points) Implement a method that takes a char array and a char and returns the number of times the char appears in the array. A 0 should be returned if the char is not in the array. Example Input - ['f', 'a', 'c', 'a', 'a', 'e', 'e', 'f'], 'a' Output - 3 Reason - In the array there are 3a ' characters. This assignment presents multiple problems that must be solved recursively. While some problems might be solved easily with iteration the goal is to get a sense of solving problems recursively. Each problem has an accompanying class file that contains tests to validate your solution as well as the method or methods to implement for each problem. You may implement any additional helper methods to help you solve the problem so long as iteration is not used except where specified. You may not change the initial method header. Problem 2 - Count Element (15 points) Implement a method that takes a char array and a char and returns the number of times the char appears in the array. A 0 should be returned if the char is not in the array. Example Input - ['f', 'a', 'c', 'a', 'a', 'e', 'e', 'f'], 'a' Output - 3 Reason - In the array there are 3a ' characters

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!