|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
DeliveryRobot.DeliveryRobot
This class implements a delivery robot, which is capable of keeping track of how how much it should collect for a delivery, in addition to the normal Robot capabilities. This particular class is also a JavaDoc example.
Constructor Summary | |
DeliveryRobot(DeliveryRobot.City acity,
int ave,
int street,
int direction)
Creates a robot with no beepers and a default cost per move. |
|
DeliveryRobot(DeliveryRobot.City acity,
int avenue,
int street,
int direction,
double moveCost)
Creates a robot with no beepers and a predefined cost per move. |
|
DeliveryRobot(DeliveryRobot.City acity,
int avenue,
int street,
int direction,
double moveCost,
int numThings)
Creates a robot with an initial number of beepers and a default cost per move. |
|
DeliveryRobot(DeliveryRobot.City acity,
int avenue,
int street,
int direction,
int numThings)
Creates a robot with an initial number of beepers and a default cost per move. |
Method Summary | |
double |
getFee()
Returns the robot's fee for the distance it has moved so far. |
void |
move()
Moves the robot forward one square. |
void |
reset()
Reset the number of moves by this robot to 0. |
Constructor Detail |
public DeliveryRobot(DeliveryRobot.City acity, int ave, int street, int direction)
public DeliveryRobot(DeliveryRobot.City acity, int avenue, int street, int direction, int numThings)
numBeepers
- The number of beepers this robot begins with.public DeliveryRobot(DeliveryRobot.City acity, int avenue, int street, int direction, double moveCost)
moveCost
- The cost of moving this robot one square.public DeliveryRobot(DeliveryRobot.City acity, int avenue, int street, int direction, double moveCost, int numThings)
numBeepers
- The number of beepers this robot begins with.moveCost
- The cost of moving this robot one square.Method Detail |
public void move()
public double getFee()
public void reset()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |