The Location Class
What An Actor
That's Not The Method I Used
Do You Have Any Class?
Potpourri
100
This location constant has an int Value of 180
What is SOUTH?
100
An actor has a location, direction, and this other physical characteristic
What is color?
100
This method is the default constructor of the bug class creating a red Bug
What is public Bug()?
100
Provides constants for compass directions and turn angles
What is the Location Class?
100
The rock, flower, location, and this class are "black box" classes
What is the Actor Class?
200
This location method returns a string representation of this location in the form (row,col)
What is public String toString()?
200
This actor does nothing when it acts
What is a rock?
200
In the critter class, this method returns a list of adjacent neighboring actors
What is public getActors()?
200
Every object in the grid is a subclass of this class
What is the Actor Class?
200
If a bug is prevented from moving, by default it does this
What is turn 45 degrees to the right?
300
In the Location Class, to move or change direction, is set by this input formula
What is setDirection(getDirection() + Constant); ?
300
This actor gets a list of its adjacent neighbors, randomly picks one of them, and changes its color to that of the selected actor
What is a ChameleonCritter?
300
"processActors" and this method are the two methods of the ChameleonCritter class inherited from the Critter class
What is public void makeMove?
300
This class extends Bug class and moves in a square pattern
What is BoxBug?
300
The int Value 225 is held by this Location constant
What is SOUTHWEST?
400
If America was divided into Location Class constant, Massachusetts would have an int Value of this value
What is 45? (Northeast)
400
The default constructor of an actor has this color
What is blue?
400
In the bug class, this method turns the bug 45 degrees to the right without changing its location
What is public void turn()?
400
This class gathers a list of neighboring actors and "eats" them
What is the Critter Class?
400
The number of rows and columns in an Unbounded Grid
What is infinite (undefined)?
500
This Location method returns the adjacent location closest to the compass
What is public Location getAdjacentLocation(int direction)?
500
This actor moves forward in a straight line turning only when the forward path is blocked
What is a bug?
500
These Location class methods are used to compare locations of the objects?
What are public boolean equals and public int compareTo?
500
This class acts by darkening its color and is pink in default
What is Flower Class?
500
The viewed grid in grid world is this
What is a GUI (Graphical User Interface)?
M
e
n
u