| Decisions: if and while Statements |
The if Statement

What word typically appears as part of the name of each of the boolean methods?
In Step 6, zelda did nothing if her way forward was blocked. Modify your code to have zelda go around the Wall if she must to the intersection on the other side and facing the same direction as she was before the action. Note: Do not forget your Stepwise Refinement skills.The while Statement

In #15 you were asked to have zelda simply 'face' Avenue 3. Comment out any Walls and have her actually go to Avenue 3.examineThings()
The CampusCleanUp project requires that the colour of a Litter object (Thing) be identified. The technique for doing so isn't all that intuitive and even though a thorough explanation is beyond us right now, we're going to explore (somewhat superficially) how it's done.
Classes that extend the Robot class inherit the method,
public final IIterate
that returns a list of the Things at the intersection. These Things can be examined, one by one. After invoking this method each Thing can be examined by calling the Iterate object's next() method. In future projects there may be multiple Things but for this assignment, there's only one.
The if and while Statements Combined
Sorting a Single Thing. Configure the City by placing a Thing at (1,4). Set the Thing's Icon to a random size between 0.0 and 1.0. Place zelda at (1,4) as well. Implement the Avatar method private void sortThingBySize() that will result in zelda relocating the Thing to (1,3) if the relative size is less than 0.5 otherwise it is placed at (1,5). In either case, zelda should return to (1,4) when finished.
Sorting Cards. Reconfigure your driver to place 10 random suit objects at (1,4) and position zelda initially on (1,4) as well. Without changing Avatar's act() method (it should still be calling the sortThingsBySize() method from Step 34), observe what happens when the project is run. What conclusion can you draw about the size of the suit objects?
Drivers' Ed