Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Quick question regarding Becker/Robot Programming. (beginner)

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Thanked 0 Times in 0 Posts

    Default Quick question regarding Becker/Robot Programming. (beginner)

    Good evening ladies and gents!
    I've got a question for you folks fluent with the Becker library.

    goToStreet(int street) : boolean (2 marks) Move to a particular street - Moves the robot to a particular street along the current avenue. Returns true on success, false if there is a wall blocking the path, in which case the robot stops at the wall.

    The above is the question i must find an answer to, not you. I just need guidance.
    How can i make my robot move to a location(set by me) by simply telling it the coordinates??
    You see, what i have done thus far is create method such as:
    public static void turnRight(Robot r){
    for (int i = 0;i < 3; i++) {

    and public static void movePlaces(Robot r, int Places ) {
    for ( int i = 0; i < Places; i ++){

    These methods, in my opinion are very simple, however im not sure how to give my robot coordinates for it to follow.

    The whole boolean part of the question is not necessary for you answer but explain to best of your knowledge.

    I've contacted my professor already about this question and im currently waiting on a reply, but i wanted to get some input from this community.

    A quick reference link, tips, points, anything but the answer would be greatly appreciated.

    Thanks in advance,


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    My Mood
    Thanked 263 Times in 232 Posts

    Default Re: Quick question regarding Becker/Robot Programming. (beginner)

    I do not know anything about the Becker library.
    It seems to me that you would instruct the robot to move forward one street at a time after checking for a wall in front of the current position. Return false if a wall is found, and return true if the robot reaches the destination without encountering a wall.

    If you want to give the robot coordinates to follow, the robot must be able to determine it's current coordinates, compare that to the desired location, and with some math determine how far to move in each direction, and do not forget about possible walls

Similar Threads

  1. quick question
    By jco69 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: April 19th, 2013, 09:38 AM
  2. Beginner seeking help with quick problem in program
    By Gravs2889 in forum What's Wrong With My Code?
    Replies: 8
    Last Post: February 23rd, 2012, 11:59 PM
  3. Quick beginner radio button question
    By smarmy_cheauffeur in forum AWT / Java Swing
    Replies: 2
    Last Post: October 17th, 2011, 08:20 AM
  4. Hi, quick question
    By curras in forum Member Introductions
    Replies: 1
    Last Post: March 21st, 2011, 03:21 PM
  5. Quick, beginner-level Java question.
    By DHG in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 27th, 2011, 01:06 PM

Tags for this Thread