Picture of Cover

         
Home
Textbook
Software
Robot Examples
Pick3
GraphOne
GraphMultiple
GraphThreads
Checkers
Robots Documentation
Demos of becker.xtras
Java Documentation
Downloads
Installation
Favorite Tools
Change Log
Instructors
 
Printer Friendly Page

Sample Code: ThreadedGraphBot.java

package examples;
import becker.robots.*;

/** Extend the GraphBot class to create a new kind of robot that will
    make a graph while executing in a thread, allowing other robots to
    work "simultaneously". */
public class ThreadedGraphBot extends GraphBot implements Runnable
{
   /** Construct a new threaded graphing robot. */
   public ThreadedGraphBot(City aCity, int anAvenue, int aStreet, int aDirection)
   {  super(aCity, anAvenue, aStreet, aDirection);
   }

   public void run()
   {  this.makeGraph();
   }
}


Contact: bwbecker@learningwithrobots.com.