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

1 Expert Approved Answer
Step: 1 Unlock

A recursive method which is a method that calls itself needs a stopping condition to prevent it from ... View full answer

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 Introduction To Programming With Java A Problem Solving Approach Questions!