Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Gridworld APCS

Classes and methods from the 2008-2009 GridWorld case study for the APCS exam

QuestionAnswer
What is the value of Location.NORTH 0
What is the value of Location.SOUTH 180
What is the value of Location.EAST 90
What is the value of Location.WEST 270
What is the value of Location.NORTHEAST 45
What is the value of Location.SOUTHEAST 135
What is the value of Location.SOUTHWEST 225
What is the value of Location.NORTHWEST 315
What is the value of Location.LEFT -90
What is the value of Location.RIGHT 90
What is the value of Location.HALF_LEFT -45
What is the value of Location.HALF_RIGHT 45
What is the value of Location.FULL_CIRCLE 360
What is the value of Location.HALF_CIRCLE 180
What is the value of Location.AHEAD 0
Which class does public Location (int r, int c)belong to? Location
Which class does public int GetRow() belong to? Location
Which class does public GetCol() belong to? Location
Which class does public Location getAdjacentLocation (int direction) belong to? Location
Which class does public int getDirectionToward (Location target) belong to? Location
Which class does public boolean equals (Object other) belong to? Location
Which class does public int compareTo (Object other)belong to? Location
Which class does public String toString()belong to? Location
Which class does public Actor() belong to? Actor
Which class does public Color getColor() belong to? Actor
Which class does public int getDirection() belong to? Actor
Which class does public Location getLocation() belong to? Actor
Which class does public Grid<Actor> getGrid() belong to? Actor
Which class does public void setColor (Color newColor) belong to? Actor
Which class does public void setDirection (int newDirection) belong to? Actor
Which class does public void moveTo(Location newLocation) belong to? Actor
Which class does public void putSelfInGrid (Grid<Actor> gr, Location loc) belong to? Actor
Which class does public void removeSelfFromGrid() belong to? Actor
Which class does public void act() belong to? Actor or Bug
Which class does public void String to String() belong to? Actor
Which class does public Bug() belong to? Bug
Which class does public Bug(Color bugColor) belong to? Bug
Which class does public void act() belong to? Bug or Actor or BoxBug or Critter
Which class does public void turn() belong to? Bug
Which class does public boolean canMove() belong to? Bug
Which class does public void move() belong to? Bug
Which class does public BoxBug (int length) belong to? BoxBug
Which class does public ArrayList<Actor> getActors() belong to? Critter
Which class does public void processActors (ArrayList<Actor> actors) belong to? Critter
Which class does public ArrayList<Location> getMoveLocations() belong to? Critter
Which class does public Location selectMoveLocation (ArrayList<location> locs) belong to? Critter
Which class does public void makeMove(Location loc) belong to? Critter
Which class does public void processActors (ArrayList<Actor> actors) belong to? ChameleonCritter
Which class does public void makeMove(location loc) belong to? ChameleonCritter
What does public Location getAdjacentLocation(int direction) do? Returns adjacent location in compass direction closest to direction
What does public int getDirectionTowards(Location target) do? Returns direction, rounded to the nearest compass direction, from this location
What does public int hasCode() do? Generates and returns a has code for this location
What does public boolean equals(Object other) do? Used to compare Location objects
What does public int compareTo(Object other) do? Used to compare Location objects
What does public String toString() do? Returns a string representation of this Location in the form of (row, col)
What does public Actor() do? Default constructor - constructos a blue actor facing north
What does public Color getColor() do? Accessor method - returns color of this Actor
What does public int getDirection() do? Accessor method - returns direction of this Actor
What does public Location getLocation() do? Accessor method - returns location of this Actor
What does public Grid<Actor> get Grid() do? Accessor method - returns the grid of this Actor, or null if the Actor is not in the grid
What does public void setColor(color newColor) do? Mutator method - changes color of this Actor
What does public void setDirection (int newDirection) do? Mutator method - changes direction of this Actor
What does public void moveTo (Location newLocation) do? Moves this Actor to a new location
What does public void putSelfInGrid (Grid<Actor> gr, Location loc) do? Puts this Actor into a given grid
What does public void removeSelfFromGrid() do? Removes this Actor from the grid
What does public act() do? Reverses the direction of this actor
What does the method public Bug () do? Default constructor - creates a red bug
What does the method public Bug (Color bugColor) do? Constructor - creates a bug with a specified color
What does the method public turn() do? Turns the bug 45 degrees to the right
What does the method boolean canMove() do? Returns true if the bug can move, false if it cannot
What does the method public void move() do? Moves the big forward, placing a flower in it's previous location
What does the method public BixBug() do? Constructor - sets sideLength to the specified length and initializes steps to zero
What does the method public ArrayList<Actor> getActors() do? Returns a list of adjacent neighbooting actors
What does the method public void processActors(ArrayList<Actor> actors) do? Processes the actors - Critter eats all actors that are not rocks or other critters
What does the method public ArrayList<location> getMoveLocations() do? Returns a list of valid, adjacent, empty neighboring locations
What does the method public Location selectMoveLocation(ArrayList<location> locs) do? Selects the location for the next move
What does the method public makeMove(Location loc) do? Moves Critter to the specified location
What does the method public void processActors(ArrayList<Actor> actors do? Randomly selects ad adjacent neighbor, and changes the ChaeloenCritter to that actor's color
What does the method public void makeMove(Location loc) do? Moves like a Criter, but turns to face its new location
Created by: mr_gorman
Popular Computers sets

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards