Boolean Logic
Arrays and ArrayLists
Strings and Substrings
OOP Concepts
GridWorld
100
NOT (TRUE OR FALSE)
What is FALSE?
100
Given an array arr[] of ints {3, 5, 4, 7}, what value is in arr[2]?
What is 4?
100
The two arguments to the relevant overload of the substring function represent these.
What are the starting index and the ending index?
100
Design methodology that involves building the parts first, then making the system out of those parts
What is Bottom-up Design?
100
The class that handles which row and column an actor is on the grid.
What is the Location Class?
200
This Java structure operates on booleans and is a simplified version of an if statement, utilizing the ? and : symbols.
What is the ternary operator?
200
Given an ArrayList arr of ints {3, 5, 4, 7, 6, 9, 2}, what call would be made to return the value "7"?
What is "arr.get(3);"?
200
The first parameter in the substring method is ____ and the second parameter is ____ (inclusive or exclusive).
What are inclusive and exclusive?
200
Similar to an abstract class, but with no implementations
What is an Interface?
200
This is the class that all bugs and critters inherit from.
What is the Actor Class?
300
A boolean operator that takes two values for input is a ____ operator; one that only takes a single input value is a ____ operator.
What are binary and unary?
300
To get the number of elements in an array, you use ____; to get the number of elements in an ArrayList you use ____. (Make sure to include parentheses where necessary)
What are "length" and "size()"?
300
"abcdefgh".substring(2, 4)
What is "cd"?
300
To use an object, you must do these two things.
What are Declare and Instantiate?
300
This is the location constant used in a bug's turning and its equivalent in degrees.
What is Location.HALF_RIGHT and 45 degrees?
400
When a program includes an OR statement and the first input is true, or when it includes an AND statement and the first input is false, this happens, preventing the second statement's evaluation.
What is short-circuiting?
400
When constructing an ArrayList, you cannot use this type of variable for the ArrayList's type.
What is a primitive variable?
400
"abcdefgh".substring(2) + "hgfedcba".substring(5)
What is "cdefghcba"?
400
A cat ____ an animal, A cat ____ a color
What are Is-a and Has-a?
400
This is the maximum number of items a critter can eat in a single act.
What is 8?
500
!(T || (F && !T)) && (F || !F)
What is FALSE?
500
This is the primary reason one would use an ArrayList over an Array.
What is dynamic resizing? (Or the ability to add elements/remove elements/change size/etc.)
500
"adbcefg".substring(1, 3 * "abcd".indexOf("acbcd".substring(2)) + 1)
What is "dbc"?
500
This three letter principle is exemplified in object-oriented programming, and it stands for ___.
DRY, and Don't Repeat Yourself
500
This is the method definition for the only method in the interface the Location class implements.
What is "public int compareTo(Object other)"?