You are on page 1of 6

1. Alice provides pre-populated worlds through which new menu tab?

Starters (*)
Blank Slates
File System - saved Alice projects can be opened and edited
Recent
2. In Alice, which of the following programming statements moves the alien backward the
distance to the asteroid, minus 2 meters?
this.Alien move backward {this.Alien getDistanceTo this.Asteroid -2} (*)
this.Alien move backward {this.Alien getDistanceTo this.Asteroid * 2}
this.Asteroid move backward {this.Alien getDistanceTo this.Asteorid / 2}
this.Alien move forward {this.Asteroid getDistanceTo this.Alien / 2}
3. What is the first step to entering comments in an Alice program?
Type comments that describe the sequence of actions in the code segment.
Drag and drop the comments tile above a code segment. (*)
Drag and drop the comments tile below a code segment.
Select the instance from the instance menu.
4. Which of the following are examples of elements you would test in your Alice animation?
All of the procedures display in alphabetical order in the Procedures tab.
Math expressions calculate as expected. (*)
Objects move with smooth timing. (*)
Event listeners trigger the correct responses. (*)
Comments were added below each sequence of instructions in the code.
5. You want an event to happen when an object collides with another object, which category
of event handler would you choose?
Mouse
Keyboard
Scene Activation/time
Position/Orientation (*)
6. Main is an example of what in the following code?
public static void main (String[] args) {
System.out.println{"Hello World!");
}

A method (*)
A class
A variable

7. Which of the following does not describe methods?


A subprogram that acts on data and often returns a value.
A set of code that is referred to by name.
Can be called at any point in a program simply by utilizing its name.
Is associated with an instance variable. (*)
8. Which of the following is not an Alice variable value type?
Color
Decimal Number
Whole Number
Function (*)

9. In Java code the { } brackets are used to represent what statements?


for
end (*)
while
begin (*)
10. In Alice, if only objects that walk on four legs need to use a procedure, in which superclass
would the procedure be declared? When a new procedure is declared, all subclasses of the
superclass will inherit the procedure.
Quadruped (*)
Biped
Swimmer
Prop
11. In

Alice, which of the following is not a control statement?


Do In Order
While
Count
Move (*)
Do Together

12. If a value has been assigned to (is stored in) a variable, that value will be overwritten
when another value is assigned to the variable using the assignment "=" operator. - True
13. Which of the following is an incorrectly written programming statement?
move(): (*)
move(2);
turn(25);

The initial scene is the first scene of an animation where you select the background template
and position the objects.
In programming terms, a class is a blueprint used to build an object, and an object is an
instance of a class. After an object is added to a scene, it is referred to as an instance of the
object. You can add many instances of the same object to a scene (multiple coral objects in
the water, for example). Each instance must have a unique name.
A class contains the instructions that define the appearance and movement of an object. All
objects within a class have common properties. The class provides instructions to Alice 3 for
creating and displaying the object when it is added to your scene.
A procedure is a piece of program code that defines how the object should execute a task.
Alice 3 has a set of procedures for each class; however, users can create or "declare" new
procedures.
An argument is a value that is used by the method to perform an action.
Argument types may include: Direction Amount Duration Text Alice 3 recognizes how
many arguments are needed for each programming instruction. It presents you with the
correct number of cascading menus to specify the values for each of those arguments.
All Alice 3 objects share the same positioning features: 3D coordinates on x, y, and z axes.
A center point, where its own axes intersect (usually at the center of mass). Sub-parts that
can move.

A procedure is a set of instructions, or programmed code, for how the object should perform a
task. One-shot procedures are available in the Scene editor. They are the same as the
procedures in the Code editor; however, they only execute one time to re- position the object,
unlike in the Code editor where they will execute every time the Run button is clicked to play
the animation.
The Methods Panel contains two tabs: Procedures: All pre-defined procedures for an object.
Functions: All pre-defined functions for an object.
A procedure is a piece of program code that defines how the object should execute a task.
Alice 3 has a set of procedures for each class; however, users can create ("declare") new
procedures.
A Function computes and answers a question about an object, such as, "What is its width or
height?", or "What is its distance from another object?" Alice 3 has a set of functions for each
class; however, users can declare new functions.
Alice creates a Do In Order control statement in the myFirstMethod procedure.
Object movement is egocentric: Objects move based on the direction they face. An
object can move in six directions: Up Down Forward Backward Right Left
Move Moves the object in any one of its six directions. Move Toward Moves the object toward
another object. Move Away From Moves the object away from another object. Move To Moves
the object from its current position to the center point of the target object.
Move and Orient To
Moves the object from its current position to the center point of the target object and adjusts
the object's orientation to match the orientation of the target object.
Delay
Halts an object's movement for a certain number of seconds. Delay can be used to slow down
the execution of an animation. Say Creates a call-out bubble with text that makes the object
appear to talk.
Turn
Rotates an object left, right, forward, or backward on its center point. Left and right turn on
the object's vertical axis; forward and backward turn on the object's horizontal axis. Roll Rolls
an object left or right on its center point using the object's horizontal axis.
Argument types may include: Object Direction Direction amount Time duration Text
An argument is a value that the procedure uses to complete its task. A computer program
uses arguments to tell it how to implement the procedure.
Arguments as Placeholders
When a procedure is dropped into the Code editor, all argument values must be specified.
There will be times that you select an argument value as a temporary placeholder value that
will be replaced later. For example, you may want an object to move forward but you are
not sure how far. Select a placeholder value of 2 meters, run the animation, determine that
a different value is needed, and then edit the value. You can also specify a placeholder
value that you will replace later with a function or a variable.
Program Development Using a Top-Down Approach Just as a homebuilder uses a set of
blueprints and follows a series of steps, a programmer uses a plan and follows a series of
steps to build a program. Homebuilders work with a purpose and set specific goals as they
buildthe rooms are energy efficient, the home meets building codes, etc. Programmer's
also work with a purpose and set goals, because without them, success cannot be measured.
Another term for the goal or purpose of an animation is a high-level scenarioa story with a
purpose

Procedure Description
Do in order Execute the statements contained within the control statement in sequential
order.
Do together Execute the statements contained within the control statement simultaneously.
Count Execute the statements contained within the control statement a specific number of
times.
While Execute the statements contained within the control statement while a specified
condition is true.
Steps to Use Random Numbers
For any numerical argument, one of the options is a random number. Select the argument
from the drop-down list. Select Random. Select nextRandomRealNumberInRange. Select
the low and high values. Run the animation. Alice 3 will randomly generate a value within
the selected range when the statement is executed.
What is a Storyboard?
A storyboard identifies the design specifications for the animation scenario: How objects
appear, move, speak, interact, and so on. Once a scenario is defined, you can begin to
develop the animation storyboard. Two types of storyboards are used to plan an animation:
Visual: A series of illustrated images that represent the main scenes of the animation.
Textual: A detailed, ordered list of actions that each object performs in each scene of the
animation.
setVehicle Procedure
The setVehicle procedure employs the concept of a rider object and a vehicle object. The
rider object is selected when the setVehicle procedure is used to specify the vehicle for the
rider. Then, when the vehicle object is programmed to move, the rider object will
automatically move with it. Examples: Person rides a camel or horse. Camera follows a
helicopter to shoot the scene from the helicopter's point of view.

Greenfoot
14. From your Greenfoot lessons, what can methods belong to?
Galleries
Classes (*)
Scenarios
Objects (*)
15. In

Greenfoot, the turn method expects what type of information in its parameters?
Degrees to turn (*)
True or false response
String statement
Integer of steps to move forward
Parameter void

16. In

Greenfoot, the move method expects what type of information in its parameters?
Degrees to turn
True or false response
String statement
Integer of steps to move forward (*)

17. In the Greenfoot IDE, an instance's position is on the x and y coordinates. True or false?
True (*)
18. From your Greenfoot lessons, what are the ways that you can view a class's methods?
In the scenario
In the class's documentation (*)
By right-clicking on an instance (*)
In the Greenfoot gallery
19. Which class holds the method that ends a Greenfoot game?
Greenfoot (*)
Class
GreenfootImage
Actor
20. In the following Greenfoot array, what statement would you write to access the "a" key?
Keynames = {"a", "b", "c", "d"};
keynames[2]
keynames["a"]
keynames[0] (*)
keynames["a" key]
21. In

Greenfoot, what is a common letter used for the loop variable?


A
I (*)
X
Y

22. In Greenfoot you can interact with the scenario using a mouse.
True (*)
False
23. Which of the following demonstrates a Greenfoot subclass/superclass relationship?

24. To

A
A
A
A

dog is a subclass of the cat superclass.


rose is a subclass of the flower superclass. (*)
computer is a subclass of a video game superclass.
single person is a superclass of the human subclass.

execute a method in your Greenfoot game, where is it called from?


The world
The act method (*)
The actor class
The gallery

You might also like