Question: Assignment Instructions: For this assignment you will be creating a number of recursive functions to solve the following problems. You can implement all of the

Assignment Instructions:
For this assignment you will be creating a number of recursive functions to solve the following problems. You can implement all of the functions in a single module.
Recursive Multiplication:
Implement a recursive algorithm to compute the product of two integers, m and n, using only addition and subtraction.
Harmonic Calculation:
Implement a recursive algorithm to compute the nth Harmonic number defined as: Isabel's Technique for List Summing:
Isabel has an approach for summing up an array (list) of integers that had a number of elements (n) equal to some power of 2(i.e.2,4,8,16,32, etc.) by creating a new list (B) of half the size of the original (A) such that B[i]= A[2i]+ A[2i+1] for all values of i in the range 0...(n/2)-1.
Implement a recursive algorithm that will calculate the sum of a list of integers using Isabel's approach. Your function can assume that the list must have a number of elements equal to some power of 2.
File Search:
Implement a recursive algorithm that will print out any files from a specified starting path (directory) that match a search term. Your algorithm should process all sub-directories within the specified starting path and should output any files that contain the search term, even if they are not an exact match.
Testing Your Program:
Write some additional code in a main method to test out each of your functions and demonstrate that they work. For the multiplication function, demonstrate all combinations of positive and negative arguments.

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