Ch 6 GridWorld Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

locatin of location class

A

info.gridworld.grid.Location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

location of Grid interface

A

info.gridworld.grid.Grid

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

location of Actor class

A

info.gridworld.actor.Actor

all the bug, folwer, rock, critter, sub critters and sub bug are located here as well (info.gridworld.actor) and extend Actor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

the runner classes ( e.g. BoxBugRunner)

A

are not tested on the AP exam

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

You need to know the documentation (API) for

A

the Grid interface, Location class, and Actor, Flower, and Rock classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

You need to know the implementations (code) for

A

Bug, BoxBug, Critter, Chameleon Critter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

a runner class

A

configures the grid and supplies a main method for a particular object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Location objects are

A

immutable; once created they can not change.+

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

grid’s put and remove methods should

A

never be used directly - use Actor’s putSelfInGrid and removeSelfFromGrid instead.

otherwise the actor won’t know that it was put in he grid, or the actor will “htink” it is sitlll in the grid while it no longer is.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

a critter

A

is an actor that can interact with other actors in a more sophisticated way.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Critter’s act method

A

1 get a list of actors to interact with
2 process actors form that list
3 get a list of locations that are candidates for this critter’s next move
4 select a location to move to from the list obtained in step 3
5 move to the selected location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

ap exam questions may ask you to reason about or to write a subclass of

A

critter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

a critter is an actor that ____ processes some other actors,____ moves

A

first, then

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

for critter, getactors, getmovelocations, and selectmovelocation must

A

leave the state of all actors unchanged

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

for critter, processactors can

A

only change hte staet of this critter and the actors in hte given list, and itm ust leave the location of this critter unchange

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

makeMove

A

can change only hte state of this critter and the actor in hte new location (if any)

17
Q

selectMoveLocation

A

can return only a location from a given list, a null, or this critter’s current location