View Single Post
Need help with Recursion.
Posts: n/a
Default Need help with Recursion. - 09-18-2010, 03:36 AM

Create a sea world with a boat and an island. Position the island some distance
away from the boat, as shown in Figure 8-26. Write a method named sailTo,
which has an Object parameter. The method should cause the boat to move one
meter toward the object and then recursively call itself until the boat has reached
the object. Test the method by calling it and passing the island as the argument
Reply With Quote