Question: We are tasked with implementing two recursive methods in the class RecurAssign. For both methods, you must include a call to MyStackTrace.printTrace ( ) method.

We are tasked with implementing two recursive methods in the class RecurAssign. For both methods, you must include a call to MyStackTrace.printTrace() method.
Tasks - RecurAssign Class
Task 1: implement a recursive method that sum all the even integers between two given numbers. The numbers may be positive, negative or zero. If the first integer (smallestInt) is larger than the second integer (largestInt) then return 0. Complete the method public int sumEvenNumbersOnly(int smallestInt, int largestInt) to complete this task. See the method comments for more detail.
Task 2: implement a recursive method that, given a string, it returns the a version of the string with all "a"s removed. The "a"'s can be uppercase or lowercase "a". The string may or may not contain "a", and could contain mutliple 'a's. The string given could also be null, so include checks for null in your implementation. Complete the method public String removeAs(String text) to complete this task. See the method comments for more detail.
Test your code using the A6Driver class., (add additional tests to your A6Driver to test any other conditions you think are necessary)
A6Driver Example Output
4
10
6
lln
MyStackTrace class:
package assignment;
public class MyStackTrace {
public static void printTrace(){
StackTraceElement [] trace =Thread.currentThread().getStackTrace();
for(int i=2; i

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!