PDA

View Full Version : Need Help Recusion


bmarh
09-18-2010, 05: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.

debussybunny563
09-18-2010, 07: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. ;)

NukeGunner
05-20-2012, 07: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.

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