Question: Binary io java help, thanks Q1. Exercise 18.4 (textbook): Write a recursive method to compute the following series and then test your code to show

Binary io java help, thanks Q1. Exercise 18.4 (textbook): Write a recursiveBinary io java help, thanks

Q1. Exercise 18.4 (textbook): Write a recursive method to compute the following series and then test your code to show m(10), m(5), m(1) 1 2 3 i + 1 Q2. Exercise 18.10 (textbook): Write a recursive method that finds the number of occurrences of a specified letter in a string using the following method header. Use a helper method to improve your code. Write a test program to test your method. public static int count (String str, char a) Q3. Write a program that searches for a specific file in a given folder and prints out the paths of all files in that folder with the given filename. If the file cannot be not found, your program should print a message "File cannot be found", where is the name of your file. Use recursion in your solution. SAMPLE RUN 1: public static void main (String[] args) find ( "Animal.java", ":/12/"); Output: C: 121 HappyFarm\ver 6 Animal.java C: 1121 HappyFarm ver 7 Animal.java SAMPLE RUN 2: public static void main (String[] args) find ('' dummy.txt " , ":/121/"); Output: Cannot find dumm y.txt Q4. Write a recursive method that returns the number of all occurrences of a given word in all the files under a directory. Write a test program. Use the following header: public static long findInFile (File file, String word)

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!