Results 1 to 2 of 2
  1. #1
    jesse is offline Member
    Join Date
    Nov 2007
    Posts
    1
    Rep Power
    0

    Unhappy 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.

  2. #2
    aadil_khan is offline Member
    Join Date
    Nov 2007
    Posts
    1
    Rep Power
    0

Similar Threads

  1. How to control robots and other devices
    By francojava in forum Advanced Java
    Replies: 0
    Last Post: 01-24-2008, 05:03 PM
  2. Need help with becker robots problem please.
    By L67Pontiac in forum New To Java
    Replies: 1
    Last Post: 07-06-2007, 08:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •