View Full Version : Need Help Recusion

09-18-2010, 04:51 PM
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 reachedthe object. Test the method by calling it and passing the island as the argument

my my will stop at the Island.

09-18-2010, 06:50 PM
I made an example.

Credit goes to Arty-fishL for the WONDERFUL and amazing looking sea scene. :D
I just made the sailboat and the sailTo method. ;)

05-20-2012, 06:47 AM
Cool scene.
How is the program making the sail boat turn toward the island though?
How is the program stoping when the sail boat is at the island.

05-20-2012, 10:29 AM
The scene is wonderful