Consider the public iterative method getFrequencyOf in the class ArrayBag, as given in Segment 2.20 of Chapter 2. Write a private recursive method that getFrequencyOf can call, and revise the definition of getFrequencyOf accordingly. Hints: Although the method getIndexOf might not look at every entry in the array, getFrequencyOf must do so. The recursive method has one base case and must choose between two recursive steps.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here