Summary of Jeroo using Java

Action Methods
hop();
hop(n); where n > 0
pick
();
plant();
toss();
give( relative_direction);
turn( relative_direction );
Each Boolean method returns a value of true or false.
hasFlower()               


isFacing(
compass_direction )
isFlower( relative_direction )
isJeroo( relative_direction )
isNet( relative_direction )
isWater(
relative_direction )
isClear( relative_direction )

Directions:

Relative Directions: LEFT, RIGHT, AHEAD, HERE
Compass Directions: NORTH, SOUTH, EAST, WEST

Constructors

Attributes

Jeroo Kim = new Jeroo();          


Accept default attributes

Location: (0,0)
Direction: EAST
Flowers: 0

Jeroo Kim = new Jeroo(8);          


Specify the flowers

Location: (0,0)
Direction: EAST
Flowers: 8

Jeroo Kim = new Jeroo(3,4);          


Specify the location

Location: (3,4)
Direction: EAST
Flowers: 0

Jeroo Kim = new Jeroo(3,4,WEST);          


Specify location and direction

Location: (3,4)
Direction: WEST
Flowers: 0

Jeroo Kim = new Jeroo(3,4,8);          


Specify location and flowers

Location: (3,4)
Direction: EAST
Flowers: 8

Jeroo Kim = new Jeroo(3,4,SOUTH,8);          


Specify all attributes

Location: (3,4)
Direction: SOUTH
Flowers: 8

A condition is just a Boolean expression -- an expression that is either true or false.