Question: The text says: The else body should contain one or more calls to the same method with argument values that are closer to the stopping
The text says: “The else body should contain one or more calls to the same method with argument values that are closer to the stopping condition’s value.” But in the previous section’s line-of-ships example, the flag signals are not likely to contain any values “that are closer to the stopping condition’s value.” In such a case, the stopping condition cannot be computed from method parameters. Identify another way for a recursive method to determine a stopping condition.
Step by Step Solution
3.40 Rating (153 Votes )
There are 3 Steps involved in it
A recursive method which is a method that calls itself needs a stopping condition to prevent it from ... View full answer
Get step-by-step solutions from verified subject matter experts
