CS 1705 Library

cs1705.web
Interface RobotTask


public interface RobotTask

This class defines the common interface for all robot task objects. It defines two methods. A concrete robot task class should define the task() method to create and initialize the desired robot(s) and command them to behave. Also, the concrete task class should define getRobot() to return the robot that is used in the task.

A RobotTask can be executed from the command-line using RunRobotTask.

Version:
2003.08.20
Author:
Stephen Edwards

Method Summary
 WebBot getRobot()
          This method provides access to the robot that carries out this task.
 void task()
          This method encapsulates a sequence of instructions for creating and commanding one or more robots (see WebBot).
 

Method Detail

task

void task()
This method encapsulates a sequence of instructions for creating and commanding one or more robots (see WebBot). Define it in any concrete class that implements this interface.


getRobot

WebBot getRobot()
This method provides access to the robot that carries out this task. In a concrete subclass implementing this interface, declare your own instance variable to hold your robot and define this method to return it.

Returns:
The robot used by this task.

Last updated: Wed, Apr 1, 2009 • 12:29 AM EDT

Copyright © 2009 Virginia Tech.