Results 1 to 2 of 2
Thread: becker.robots problem.
- 11-26-2007, 07:56 AM #1
Member
- Join Date
- Nov 2007
- Posts
- 1
- Rep Power
- 0
becker.robots problem.
I really need help with this problem. I have tried alot of methods to do this but my attempts are just simply not good enough.
My problem is -
# TopSoil01.cty
# Window title
Spread Top Soil: Test Case
# first street, first avenue, num streets, num avenues
0 0 30 10
# intersection size
38
# There is a Robot that likes to garden. In the spring
# the Robot needs to spread topsoil in her garden beds.
# There is a large pile of topsoil in the intersection immediately
# in front of her. You may assume that there is more than
# enought topsoil. The topsoil is to be spread on the
# other side of a stone wall.
#
# Program the gardening Robot to spread the topsoil one wheelbarrow
# at a time on the East side of the wall. Unfortunately
# the Robot does not know how long the wall is to the left and
# to the right, and so it has to first determine how many steps there
# are to the left end of the wall and how many there are to the right.
# Having determined this, the robot will return to the pile of topsoil
# and begin to carry loads around the wall in the shorter direction.
# Of course, at some point, it will become a shorter trip for the robot
# if it takes a load in the other direction. Your program must determine
# this.
# Also note that the robot needs to stop taking loads when every
# location on the other side of the wall has had one pile of
# topsoil dumped.
#In your program, you must instantiate a Robot as shown below.
#becker.robots.Robot 8 2 Direction.WEST
#The garden wall
becker.robots.Wall 3 4 Direction.WEST
becker.robots.Wall 4 4 Direction.WEST
becker.robots.Wall 5 4 Direction.WEST
becker.robots.Wall 6 4 Direction.WEST
becker.robots.Wall 7 4 Direction.WEST
becker.robots.Wall 8 4 Direction.WEST
becker.robots.Wall 9 4 Direction.WEST
becker.robots.Wall 10 4 Direction.WEST
becker.robots.Wall 11 4 Direction.WEST
becker.robots.Wall 12 4 Direction.WEST
becker.robots.Wall 13 4 Direction.WEST
becker.robots.Wall 14 4 Direction.WEST
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
becker.robots.Thing 8 3
# Add more things for longer walls by copying the above
# statements as many times as necessary.
__________________________________________________ _______________
All i am asking is how about would you go thru with this problem. eg what loops will you use or how would you deal this with what steps.
I have been cracking this problem for about 5hours and i still cant figure this out. All help are greatly appreciate and Thank you for your time.
- 11-26-2007, 10:25 PM #2
Member
- Join Date
- Nov 2007
- Posts
- 1
- Rep Power
- 0
Similar Threads
-
How to control robots and other devices
By francojava in forum Advanced JavaReplies: 0Last Post: 01-24-2008, 04:03 PM -
Need help with becker robots problem please.
By L67Pontiac in forum New To JavaReplies: 1Last Post: 07-06-2007, 07:50 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks