You are on page 1of 75

1. Which of the following is not a step in the Alice animation development process?

Mark for
Review

1. Sell the animation (*)


2. Define the scenario
3. Run the animation
4. Design a storyboard
5. Program the animation

2. In Alice, which of the following programming statements moves the butterfly forward,
double the distance to the tree? Mark for Review

(1) Points

1. this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree * 2} (*)


2. this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}
3. this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}
4. this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}

3. From your Alice lessons, the If control structure can process one true and one false
response. True or false? Mark for Review

(1) Points

1. True (*)
2. False

4. In Alice, we use the While control statement to implement the conditional loop. True or
false? Mark for Review

(1) Points

1. True (*)
2. False
5. A loop can be infinite (continue forever) or conditional (stops upon a condition). True or
false? Mark for Review

(1) Points

1. True (*)
2. False

6. In Alice, procedural abstraction is the concept of making code easier to understand and
reuse. True or false? Mark for Review

(1) Points

1. True (*)
2. False

7. In Alice, if a procedure is declared for MyClownFish, which classes can use the procedure?
Mark for Review

(1) Points

1. MyClownFish class and MySwimmer class


2. MyClownFish class (*)
3. MyPajamaFish class, MyClownFish class, and MySwimmer class
4. Any class with "Fish" in the class name

8. In Alice, which of the following are benefits of separating out motions into their own
procedures? Mark for Review

(1) Points

1. (Choose all correct answers)


2. It makes the animation easier to run.
3. It makes the scene easier to view.
4. It simplifies code and makes it easier to read. (*)
5. It allows many objects of a class to use the same procedure. (*)
6. It can allow subclasses of a superclass to use a procedure. (*)
9. In Alice, which of the following instructions move the Blue Tang fish forward 2 meters?
Mark for Review

(1) Points

1. this.blueTang move Forward 0.2


2. this.blueTang move Forward 2
3. this.blueTang move Backward 2
4. this.blueTang move Forward 2.0 (*)

10. From your Alice lessons, the Do In Order control statement is also referred to by what
other name? Mark for Review

(1) Points

1. Sequence control
2. Sequential control (*)
3. Control order
4. Order control

11. In Alice, which of the following procedures play a sound? Mark for Review

1. playSound
2. playAudio (*)
3. playSoundFile
4. playFile

12. From your Alice lessons, the "Checklist for Animation Completion" does not ask questions
about the scenario and storyboards, because these are not valid parts of the animation creation
process. True or false? Mark for Review

(1) Points

1. True
2. False (*)

13. From your Alice lessons, when coding for keyboard control, the programmer's job is to
consider at least 70% of every key stroke the user could take. True or false? Mark for Review

(1) Points

1. True
2. False (*)

14. From your Alice lessons, you can run the animation to test that it works properly. True or
false? Mark for Review

(1) Points

1. True (*)
2. False

15. Expressions with relational operators produce true and false values. True or false?

Mark for Review

(1) Points

1. True (*)
2. False

16. Which of the following does not describe variables? Mark for Review

1. A place in memory where data of a specific type can be stored for later retrieval and
use.
2. Has a unique name.
3. Has a type associated with it.
4. Arranged in rows and columns. (*)

17. From your Alice lessons, a Do Together statement embedded with two move statements is
an example of what? Mark for Review
1. Harmony
2. Compilation
3. Forward thinking
4. Nesting (*)

18. In Alice, once procedures are added to a control statement, they cannot be changed. True
or false? Mark for Review

(1) Points

1. True
2. False (*)

19. Do In Order and Do Together are the only control statements available in Alice. True or
false? Mark for Review

(1) Points

1. True
2. False (*)

20. From your Alice lessons, built-in functions provide precise property details for the
following areas: Mark for Review

(1) Points

1. Proximity and size


2. Distance to and nesting
3. Proximity, size, spatial relation, and point of view (*)
4. Proximity and point of view

21. Which of the following is not an example of the logic of an IF control structure? Mark for
Review

(1) Points
1. Play the video three times. (*)
2. If the play button is pressed, then play the video one time.
3. If the doorbell rings, then the door opens.
4. If the bird rings the bell, a treat is dispensed.

22. Which of the following statements about methods is false? Mark for Review

(1) Points

1. Classes must be defined directly within a method definition. (*)


2. Methods whose return type is not void are required to include a return statement
specifying what to return.
3. The order in which methods are listed within the class is not important.
4. Java does not permit nesting one method definition within another method's definition.

23. From your Alice lessons, how do you add an instance to a scene in Alice? Mark for Review

(1) Points

1. Select the instance from your computer's network.


2. Write code that places the instance in the scene.
3. Select the class, then drag the object into the scene. (*)
4. Call the addObject method.

24. All objects in Alice have three dimensional coordinates on which axes? Mark for Review

(1) Points

(Choose all correct answers)

1. x (*)
2. y (*)
3. z (*)
4. w
5. All of the above

25. From your Alice lessons, what is a one-shot procedural method? Mark for Review

(1) Points

1. A procedure that is invoked when the Run button is clicked.


2. A procedure that is used to make a scene adjustment. (*)
3. A procedure that is dragged into the code editor.
4. A procedure that is used to launch the program.

26. Which of the following Java syntax is used to correctly create a Duke subclass? Mark for
Review

(1) Points

1. private Dog extends World


2. public class Dog extends World
3. public class Duke extends Animal (*)
4. private class extends Actor
5. private class extends Duke

27. In Greenfoot, a subclass is a specialization of a superclass. True or false? Mark for Review

(1) Points

1. True (*)
2. False

28. From your Greenfoot lessons, source code is written in the code editor. True or false?
Mark for Review

(1) Points

1. True (*)
2. False
29. In Greenfoot, a variable can be saved and accessed later, even if the instance no longer
exists. True or false? Mark for Review

(1) Points

1. True
2. False (*)

30. What does the following Greenfoot programming statement do?

turn(18); Mark for Review

(1) Points

1. Turn the object 36 degrees.


2. Turn the object 18 degrees. (*)
3. Turn the object 18 steps forward.
4. Move the object 18 steps forward.

31. In the Greenfoot IDE, which of the following are components of a parameter? Mark for
Review

(1) Points

(Choose all correct answers)

1. Parameter type (*)


2. Parameter return
3. Parameter name (*)
4. Parameter method
5. Parameter void

32. From your Greenfoot lessons, abstraction techniques can only be used once in a class's
source code. True or false? Mark for Review

(1) Points

1. True
2. False (*)

33. From your Greenfoot lessons, which of the following are examples of abstraction? Mark
for Review

(1) Points

(Choose all correct answers)

1. Playing a range of sounds when keyboard keys are pressed. (*)


2. A single instance displays a single image.
3. Assigning a different keyboard key to each instance. (*)
4. Programming a single movement for a single instance.
5. Assigning a different image file to each instance. (*)

34. Greenfoot does not have tools to record sound. True or false? Mark for Review

(1) Points

1. True
2. False (*)

35. What type of parameter does the Greenfoot playSound method expect? Mark for Review

(1) Points

1. name of a sound file (as String) (*)


2. name of an integer (as int)
3. name of a keyboard key (as String)
4. name of the class (as String)

Section 3
36. From your Greenfoot lessons, which line of code is missing something?

Mark for Review

(1) Points

1. 1
2. 3 (*)
3. 4
4. 5
5. 6

37. From your Greenfoot lessons, which of the following is an example of changing test data
during a Q/A test cycle? Mark for Review

(1) Points

1. Use a different operating system.


2. Use the mouse instead of the keyboard.
3. Use symbols instead of numbers. (*)
4. All of the above.

38. From your Greenfoot lessons, dot notation allows you to use a method from a different
class, if the class you are programming does not possess the method. True or false? Mark for
Review

(1) Points

1. True (*)
2. False

39. Use you Greenfoot knowledge: What range of numbers does the following method return?

Greenfoot.getRandomNumber(30) Mark for Review

(1) Points
1. A random number between 1 and 30.
2. A random number between 0 and 30.
3. A random number between 0 and 29. (*)
4. A random number between 1 and 29.

40. From your Greenfoot lessons, classes can only use the methods they have inherited. They
cannot use methods from other classes. True or false? Mark for Review

(1) Points

1. True
2. False (*)

41. From your Greenfoot lessons, a problem statement defines the purpose for your game.
True or false? Mark for Review

1. True (*)
2. False

42. Use your Greenfoot knowledge: An array object holds a single variable. True or false?
Mark for Review

1. True
2. False (*)

43. In Greenfoot, a local variable is declared at the beginning of a class. True or false? Mark
for Review

1. True
2. False (*)
44. From your Greenfoot lessons, which of the following logic operators represents "and"?
Mark for Review

1. &
2. && (*)
3. =
4. !

45. Use your Greenfoot knowledge to answer the question. One reason to write a defined
method in a class is to change the behavior of the class. True or false? Mark for Review

1. True (*)
2. False

46. To execute a method in your Greenfoot game, where is it called from? Mark for Review

1. The world
2. The act method (*)
3. The actor class
4. The gallery

47. In Greenfoot, a way to have all subclasses of a superclass inherit a method is by adding the
method to the superclass. True or false? Mark for Review

1. True (*)
2. False

48. We can use the Actor constructor to automatically create Actor instances when the
Greenfoot world is initialized. True or false? Mark for Review

1. True
2. False (*)
49. Use your Greenfoot knowledge to answer the question: Where are defined variables
typically entered in a class's source code? Mark for Review
1. In the defined method in the source code.
2. Between the constructors and methods in the source code.
3. After the constructors and methods in the source code.
4. At the top of the source code, before the constructors and methods. (*)

50. In Greenfoot, we can use the act method in the class to automatically create the Actor
instances when the world is initialized. True or false? Mark for Review

1. True
2. False (*)

1. In computing, a textual storyboard is called a source code: a list of actions to perform a task
or solve a problem. True or false? Mark for Review

1. True
2. False (*)

2. In Alice, which of the following programming statements moves the cat backward, half the
distance to the bird? Mark for Review

(1) Points

1. this.Cat move backward {this.Bird getDistanceTo this.Cat / 2}


2. this.Cat move forward {this.Bird getDistanceTo this.Cat / 2}
3. this.Bird move forward {this.Bird getDistanceTo this.Cat / 2}
4. this.Cat move backward {this.Cat getDistanceTo this.Bird / 2} (*)

3. Expressions with relational operators produce true and false values. True or false?

1. True (*)
2. False

4. A typical application uses various values and these values continuously change while the
program is running. True or false? Mark for Review

(1) Points
1. True (*)
2. False

5. In Alice, which of the following are benefits of separating out motions into their own
procedures? Mark for Review

(1) Points

(Choose all correct answers)

1. It makes the animation easier to run.


2. It makes the scene easier to view.
3. It simplifies code and makes it easier to read. (*)
4. It allows many objects of a class to use the same procedure. (*)
5. It can allow subclasses of a superclass to use a procedure. (*)

6. In Alice, procedural abstraction is the concept of making code easier to understand and reuse.
True or false? Mark for Review

(1) Points

1. True (*)
2. False

7. In Alice, when a new procedure is declared, all subclasses of the superclass will inherit the
procedure. True or false? Mark for Review

1. True (*)
2. False

8. From your Alice lessons, variables are fixed and cannot be changed. True or false? Mark
for Review

1. True
2. False (*)

9. From your Alice lessons, what can be used as a guideline to ensure your animation fulfills
animation principles? Mark for Review
(1) Points

1. The Internet
2. Animation checklist (*)
3. A close friend
4. None of the above

10. From your Alice lessons, number, boolean, String and object are all examples of variable
types. True or false? Mark for Review

(1) Points

1. True (*)
2. False

11. Which of the following is not an example of the logic of an IF control structure?

1. Play the video three times. (*)


2. If the play button is pressed, then play the video one time.
3. If the doorbell rings, then the door opens.
4. If the bird rings the bell, a treat is dispensed.

12. Main is an example of what in the following code?

public static void main (String[] args) {

System.out.println{"Hello World!");

} Mark for Review

1. An instance
2. A method (*)
3. A class
4. A variable
13. A complete Alice instruction includes which of the following components? Mark for
Review

(Choose all correct answers)

1. Image
2. Class
3. Procedure (*)
4. Direction (*)
5. Amount (*)

14. In Alice, which of the following instructions roll the Blue Tang fish left 1 meter? Mark
for Review

1. this.blueTang roll Left 1.0 (*)


2. this.blueTang Left 1.0
3. this.blueTang Left 1
4. this.blueTang roll Left 1

15. From your Alice lessons, random numbers are set in the distance and duration arguments in
a procedure. True or false? Mark for Review

(1) Points

1. True (*)
2. False

16. From your Alice lessons, what is a one-shot procedural method? Mark for Review

(1) Points

1. A procedure that is invoked when the Run button is clicked.


2. A procedure that is used to make a scene adjustment. (*)
3. A procedure that is dragged into the code editor.
4. A procedure that is used to launch the program.
17. From your Alice lessons, an instance's properties cannot be modified. True or false? Mark
for Review

(1) Points

1. True
2. False (*)

18. From your Alice lessons, saving multiple versions of an Alice animation scene is unimportant,
because it does not save time. It actually wastes time. True or false? Mark for Review

(1) Points

1. True
2. False (*)

19. What Alice tool can be used to diagram the If conditional execution statement? Mark
for Review

(1) Points

1. Cause and effect diagram


2. Process flow diagram (*)
3. Conditional flow diagram

20. From your Alice lessons, the If control structure can process one true and one false
response. True or false? Mark for Review

1. True (*)
2. False

21. The Alice If control structure requires the false statement to be populated. True or false?
Mark for Review
1. True
2. False (*)

22. In Alice, which of the following arguments are available to further refine an object's
movements? Mark for Review

(Choose all correct answers)

1. Object
2. Distance (*)
3. Duration (*)
4. Delay

23. From your Alice lessons, where should comments be placed? Mark for Review

1. Above each set of programming statements. (*)


2. At the end of the program.
3. In the scene editor.
4. In their own procedure.

24. In Alice, once procedures are added to a control statement, they cannot be changed. True or
false? Mark for Review

1. True
2. False (*)

25. In Alice, functions are dragged into the control statement, not the procedure. True or false?
Mark for Review

1. True
2. False (*)

26. Which of the following demonstrates a Greenfoot subclass/superclass relationship? Mark


for Review

(1) Points
1. A dog is a subclass of the cat superclass.
2. A rose is a subclass of the flower superclass. (*)
3. A computer is a subclass of a video game superclass.
4. A single person is a superclass of the human subclass.

27. In Greenfoot, which of the following are execution controls? Mark for Review

(Choose all correct answers)

1. Run (*)
2. Act (*)
3. Speed (*)
4. Move
5. Turn

28. In a Greenfoot if-else statement, if the condition is true, the if-statement is executed, and
then the else-statement is executed. True or false? Mark for Review

(1) Points

1. True
2. False (*)

29. From your Greenfoot lessons, which type of constructor can be used to automate creation of
Actor instances? Mark for Review

1. Animal
2. World (*)
3. Actor
4. Vector
30.From your Greenfoot lessons, classes can only use the methods they have inherited. They
cannot use methods from other classes. True or false? Mark for Review

1. True
2. False (*)

Test: Java Fundamentals Mid Term Exam

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct
answer.

Section 3

31. From your Greenfoot lessons, how do you test that your code does not contain bugs?
Mark for Review

1. Write the code.


2. Inspect the instances.
3. Review the documentation.
4. Compile the code. (*)

32. From your Greenfoot lessons, which line of code is missing something?

1. 1
2. 3 (*)
3. 4
4. 5
5. 6
33. In Greenfoot, you may perform the programming tasks of create and test many times. True
or false? Mark for Review

1. True (*)
2. False
34. Greenfoot does not have tools to record sound. True or false? Mark for Review

1. True
2. False (*)

35. In Greenfoot, which method checks if a key on the keyboard has been pressed? Mark
for Review

1. keyPress method
2. keyUp method
3. keyDown method (*)
4. keyClick method

36. In Greenfoot, actor constructors can be used to create images or values and assign them to
the variables. True or false? Mark for Review

1. True (*)
2. False

37. When you re-initialize a scenario, Greenfoot automatically displays an instance of the World
subclass in the scenario. True or false? Mark for Review

1. True (*)
2. False

38. In Greenfoot, an if-statement is used to alternate between displaying two images in an


instance. True or false? Mark for Review

1. True
2. False (*)
39. In Greenfoot, a local variable is declared at the beginning of a class. True or false? Mark
for Review

1. True
2. False (*)

40. In Greenfoot, what is a common letter used for the loop variable? Mark for Review

1. A
2. I (*)
3. X
4. Y

41. In Greenfoot, which of the following statements could prevent an infinite loop from
occurring? Mark for Review

1. I = 100 + i
2. i=1
3. i=i
4. i = i + 1 (*)

42. Use your Greenfoot knowledge to answer the question. One reason to write a defined
method in a class is to change the behavior of the class. True or false? Mark for Review

1. True
2. False *

43. To execute a method in your Greenfoot game, where is it called from? Mark for
Review

1. The world
2. The act method (*)
3. The actor class
4. The gallery

44. In Greenfoot, defined methods must be used immediately. True or false? Mark for
Review

1. True
2. False (*)

45. In the Greenfoot IDE, which of the following is not a property of an instance? Mark
for Review

1. Position
2. Inherited methods
3. Scenario name (*)
4. Defined methods

46. What does the following Greenfoot programming statement do?

turn(18); Mark for Review

1. Turn the object 36 degrees.


2. Turn the object 18 degrees. (*)
3. Turn the object 18 steps forward.
4. Move the object 18 steps forward.

47. What type of Greenfoot method would be used to turn an object? Mark for Review

1. orientTo( );
2. turnAround( );
3. move ( );
4. turn( ); (*)
48. From your Greenfoot lessons, abstraction techniques can only be used once in a class's
source code. True or false? Mark for Review

1. True
2. False (*)

49. Use your Greenfoot knowldege: Abstraction occurs in many different ways in programming.
True or false? Mark for Review

1. True (*)
2. False

50. In Greenfoot, what happens if the condition is false in an if-statement? Mark for
Review

1. The programming statements are executed.


2. The if-statement is executed.
3. The act method is deleted.
4. The programming statements are not executed. (*)

1. What Alice tool can be used to diagram the If conditional execution statement?

1. Cause and effect diagram


2. Process flow diagram (*)
3. Conditional flow diagram

2. A conditional loop is a loop that will continue forever. True or false?

1. True
2. False (*)
3. From your Alice lessons, the If control structure can process one true and one false
response. True or false

1. True (*)

4. From your Alice lessons, a textual storyboard provides a detailed, ordered list of the
actions each object performs in each scene of the animation. True or false?

2. True (*)
3. False

5. Identify an example of an Alice expression.

1. "I feel happy."


2. If or Where
3. 3x3=9 (*)
4. None of the above

6. In Alice, Do In Order and Do Together:

1. Are move statements


2. Are control statements (*)
3. Are complex statements
4. None of the above

7. In Alice, the vehicle property will associate one object to another. True or false?

1. True (*)
2. False

8. In Alice, functions are dragged into the control statement, not the procedure. True or
false?

1. True
2. False (*)

9. Do In Order and Do Together are the only control statements available in Alice. True or
false?
1. True
2. False (*)

10. In Alice, objects inherit the characteristics of their:

1. Code
2. Project
3. Class (*)
4. Program

11. In Alice, when a new procedure is declared, its motions are coded in a separate tab.
True or false?

1. True (*)
2. False

12. In Alice, a person object inherits its procedures, functions, and properties from which of
the following classes? (Choose all correct answers)

1. Object subclass
2. Biped class (*)
3. Quadruped class
4. Person subclass (*)

13. From your Alice lessons, variables are fixed and cannot be changed. True or false?

1. True
2. False (*)

14. Define the value of the variable LapCount based on the following math calculation:
LapCount + 10 = 15

1. 2
2. 4
3. 5 (*)
4. 15
5. 10
15. A variable is a named location inside the computer's memory; once there, the
information can be retrieved and changed. True or false?

1. True (*)
2. False

16. Which of the following does not describe variables?

A place in memory where data of a specific type can be stored for later retrieval and use.

1. Has a unique name.


2. Has a type associated with it.
3. Arranged in rows and columns. (*)

17. A typical application uses various values and these values continuously change while the
program is running. True or false?

1. True (*)
2. False

18. Which of the following is a procedure to precisely position an Alice object?

1. Move
2. Turn
3. Roll
4. MoveToward
5. All of the above (*)

19. All objects in Alice have three dimensional coordinates on which axes? (Choose all
correct answers)

1. x (*)
2. y (*)
3. z (*)
4. w
5. All of the above

20. From your Alice lessons, how do you add an instance to a scene in Alice?

1. Select the instance from your computer's network.


2. Write code that places the instance in the scene.
3. Select the class, then drag the object into the scene. (*)
4. Call the addObject method.

21. Which of the following is not an example of the logic of an IF control structure?

1. Play the video three times. (*)


2. If the play button is pressed, then play the video one time.
3. If the doorbell rings, then the door opens.
4. If the bird rings the bell, a treat is dispensed.

22. Each parameter is listed with its name first, then its data type. True or false?

1. True
2. False (*)

23. Which Alice execution task corresponds with the following storyboard statement?

Cat turns to face mouse.

1. this.mouse turnToFace this.cat


2. mouse turnTo cat
3. this.cat turnToFace this.mouse (*)
4. cat TurnTo mouse

24. In Alice, which of the following procedures make an object say something?

1. talk
2. speak
3. say (*)
4. audible

25. From your Alice lessons, random numbers are set in the distance and duration
arguments in a procedure. True or false?

1. True (*)
2. False
26. In Greenfoot, what type of parameter does the keyDown method expect?

1. String (*)
2. Boolean
3. Integer
4. Method

27. From your Greenfoot lessons, the keyDown method is located in which class?

1. Actor
2. Greenfoot (*)
3. GreenfootImage
4. World

28. From your Greenfoot lessons, if the condition in an if-statement is true, the first code
segment is executed. True or false?

1. True (*)
2. False

29. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false?

1. True (*)
2. False

30. From your Greenfoot lessons, abstraction techniques can only be used once in a class's
source code. True or false?

1. True
2. False (*)

31. In Greenfoot, you must first create an instance before you create a class. True or false?

1. True
2. False (*)

32. From your Greenfoot lessons, an instance inherits all of the characteristics of the class,
and those characteristics
cannot be changed. True or false?

1. True
2. False (*)

33. From your Greenfoot lessons, how do you call a defined method?

1. Call the method from the act method. (*)


2. Call the method from the defined method.
3. Write the method in the World superclass.
4. Write the method in the instance.
5. Write the method in the source code.

34. Use your Greenfoot knowledge to answer the question. One reason to write a defined
method in a class is to change the behavior

of the class. True or false?

1. True (*)
2. False

35. From your Greenfoot lessons, to save space in the act method, you can write an entirely
new method below it, called a _____________.

1. Class method
2. Instance method
3. Defined method (*)
4. World method
5. Code method

36. In Greenfoot, which of the following statements could prevent an infinite loop from
occurring?

1. I = 100 + i
2. i=1
3. i = i
4. i = i + 1 (*)

37. In Greenfoot, which statement is a correct example of string concatenation?

1. Duke duke = new Duke(keyNames[i], soundNames[i]);


2. Duke duke = (keyNames[i], soundNames[i] + ".wav");
3. Duke duke = new Duke(keyNames[i], soundNames[i] + ".wav"); (*)
4. Duke duke = (soundNames[i] + ".wav");

38. From your Greenfoot lessons, which of the following logic operators represents "and"?

1. &
2. && (*)
3. =
4. !

39. We can use the Actor constructor to automatically create Actor instances when the
Greenfoot world is initialized. True or false?

1. True
2. False (*)

40. Use your Greenfoot knowledge to answer the question: Where are defined variables
typically entered in a class's source code?

1. In the defined method in the source code.


2. Between the constructors and methods in the source code.
3. After the constructors and methods in the source code.
4. At the top of the source code, before the constructors and methods. (*)

41. Using the Greenfoot IDE, when is a constructor automatically executed?

1. When source code is written.


2. When a new image is added to the class.
3. When a new instance of the class is created. (*)
4. When the act method is executed.

42. From your Greenfoot lessons, which axes define an object's position in a world?

(Choose all correct answers)

1. x (*)
2. z
3. y (*)
4. w

43. When a Greenfoot code segment is executed in an if-statement, each line of code is
executed in sequential order. True or false?

1. True (*)
2. False

44. From your Greenfoot lessons, which of the following comparison operators represents
"greater than"?

1. (*)
2. <
3. ==
4. !=

45. In Greenfoot, you will not receive an error message if your code is incorrect. It will
simply not work, and you will have to determine why the code doesn't work. True or false?

1. True
2. False (*)
46. In the Greenfoot IDE, which of the following is not a property of an instance?

1. Position
2. Inherited methods
3. Scenario name (*)
4. Defined methods

47. What does the following Greenfoot programming statement do?

turn(18);

1. Turn the object 36 degrees.


2. Turn the object 18 degrees. (*)
3. Turn the object 18 steps forward.
4. Move the object 18 steps forward.

48. In the Greenfoot IDE, which of the following are components of a parameter?

(Choose all correct answers)

1. Parameter type (*)


2. Parameter return
3. Parameter name (*)
4. Parameter method
5. Parameter void

49. From your Greenfoot lessons, what is incorrect in this code example:

setLocation(getX(), (int) (altitude);

1. Spacing
2. Capitalization
3. Parenthesis (*)
4. Comma

50. In Greenfoot, in which programming task are the objects identified?

1. Define the problem.


2. Design the solution.
3. Program the solution. (*)
4. Test the solution.
1. Which of the following is an example of nesting in an Alice program? Mark for
Review

1. Text is nested inside of a comments tile.


2. Distance, duration, and direction arguments are nested inside of a procedure.
3. A move procedure is nested inside of a turn procedure.
4. Five Do Together statements are nested inside of a Do In Order statement. (*)

2. What tool can be used to diagram an IF conditional execution


statement? Mark for Review

1. Cause and effect diagram


2. Process flow diagram (*)
3. Conditional flow diagram

3. From your Alice lessons, where on an object do an object's axes


intersect? Mark for Review

1. At the object's chest


2. At the object's head
3. At the object's center point (*)
4. At the object's bottom

4. Which of the following is not a reason for why comments are helpful in
an Alice program? Mark for Review

1. Comments change the functionality of the program. (*)


2. Comments describe the intention of the programming instructions.
3. Comments can outline the programming instructions.
4. Comments help during debugging and testing so the tester knows how the
programming statements are supposed to work.

5. From your Alice lessons, the "Checklist for Animation Completion" does
not ask questions about the scenario and storyboards, because these are not valid parts of the
animation creation process. True or false? Mark for Review

1. True
2. False (*)

6. Which of the following are examples of elements you would test in your Alice
animation? Mark for Review

(Choose all correct answers)

1. All of the procedures display in alphabetical order in the Procedures tab.


2. Math expressions calculate as expected. (*)
3. Objects move with smooth timing. (*)
4. Event listeners trigger the correct responses. (*)

7. In Alice, which of the following programming statements moves the


butterfly forward, double the distance to the tree? Mark for Review

(1) Points

1. this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree * 2} (*)


2. this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}
3. this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}
4. this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}

8. Identify an example of an Alice expression. Mark for Review


1. "I feel happy."
2. If or Where
3. 3x3=9 (*)
4. None of the above
5.
9. Which of the following is not a relational operator? Mark for
Review

1. <
2. // (*)
3. >
4. =

10. Examine the following code. What are the variables?

(Choose all correct answers)

1. args
2. n (*)
3. i (*)
4. t

11. In Alice, functions are dragged into the control statement, not the procedure. True or
false? Mark for Review

1. True
2. False (*)

12. In Alice, a computer program requires functions to tell it how to perform the
procedure. True or false? Mark for Review
1. True
2. False (*)

13. In Alice, the setVehicle procedure will associate one object to another.
True or false? Mark for Review

1. True (*)
2. False

14. In Alice, the procedures' arguments allow the programmer to adjust the
object, motion, distance amount, and time duration. True or false? Mark for Review

1. True (*)
2. False

15. From your Alice lessons, which of the following are types of
storyboards? Mark for Review

(Choose all correct answers)

1. Actual
2. Textual (*)
3. Factual
4. Visual (*)
5. Fictional

16. In Alice, which of the following is the most likely situation where procedural abstraction
could be used? Mark for Review

1. Five dogs all need to bark and run at the same time. (*)
2. One fish needs to swim forward 1 meter.
3. Two fish say something to each other.
4. One person moves up 10 meters.

17. In Alice, if a procedure is declared for a clownFish class, which classes


can use the procedure? Mark for Review

1. The clownFish class and Swimmer class


2. ClownFish class (*)
3. The pajamaFish class, clownFish class, and Swimmer class
4. Any class with "Fish" in the class name

18. Main is an example of what in the following code?

public static void main (String[] args) {

System.out.println{"Hello World!");

} Mark for Review

1. An instance
2. A method (*)
3. A class
4. A variable

19. If you want one message to display if a user is below the age of 18 and
a different message to display if the user is 18 or older, what type of construct would you use?
Mark for Review

1. for all loop


2. do loop
3. while loop
4. if (*)

20. Which of the following is not an Alice variable value type? Mark for Review

(1) Points
1. Color
2. Decimal Number
3. Whole Number
4. Function (*)

21. A variable is a named location inside the computer's memory; once there, the
information can be retrieved and changed. True or false? Mark for Review

1. True (*)
2. False

22. Which of the following is not a type of event listener in Alice? Mark
for Review

1. Scene Activation/Time
2. Cursor (*)
3. Keyboard
4. Mouse
5. Position/Orientation

Section 3

(Answer all questions in this section)

23. Use your Greenfoot knowldege: Abstraction occurs in many different


ways in programming. True or false? Mark for Review

1. True (*)
2. False
24. In Greenfoot, you will not receive an error message if your code is
incorrect. It will simply not work, and you will have to determine why the code doesn't work.
True or false? Mark for Review

1. True
2. False (*)

25. From your Greenfoot lessons, a problem statement defines the purpose
for your game. True or false? Mark for Review

1. True (*)
2. False

26. Which class holds the method that ends a Greenfoot game? Mark for Review

1. Greenfoot (*)
2. Class
3. GreenfootImage
4. Actor

27. We can use the Actor constructor to automatically create Actor


instances when the Greenfoot world is initialized. True or false? Mark for Review

1. True
2. False (*)

28. Using the Greenfoot IDE, when is a constructor automatically


executed? Mark for Review

1. When source code is written.


2. When a new image is added to the class.
3. When a new instance of the class is created. (*)
4. When the act method is executed.

29. Use your Greenfoot knowledge to answer the question. One reason to
write a defined method in a class is to change the behavior of the class. True or false? Mark
for Review

1. True
2. False (*)

30. In Greenfoot, a way to have all subclasses of a superclass inherit a


method is by adding the method to the superclass. True or false? Mark for Review

(1) Points

1. True (*)
2. False

31. Which of the following Java syntax is used to correctly create a Duke subclass? Mark
for Review

1. private Dog extends World


2. public class Dog extends World
3. public class Duke extends Animal (*)
4. private class extends Actor
5. private class extends Duke

32. From your Greenfoot lessons, a scenario is a game or simulation


implemented in Greenfoot. True or false? Mark for Review

1. True (*)
2. False
33. What type of parameter does the Greenfoot playSound method
expect? Mark for Review

1. name of a sound file (as String) (*)


2. name of an integer (as int)
3. name of a keyboard key (as String)
4. name of the class (as String)

34. From your Greenfoot lessons, when a method needs additional data to
perform a task, this data comes from parameters. True or false? Mark for Review

1. True (*)
2. False

35. What does the following Greenfoot programming statement do?

turn(18); Mark for Review

1. Turn the object 36 degrees.


2. Turn the object 18 degrees. (*)
3. Turn the object 18 steps forward.
4. Move the object 18 steps forward.

36. In the Greenfoot IDE, which of the following is not a property of an instance? Mark
for Review

1. Position
2. Inherited methods
3. Scenario name (*)
4. Defined methods

37. In Greenfoot, a variable can be saved and accessed later, even if the
instance no longer exists. True or false? Mark for Review
1. True
2. False (*)

38. From your Greenfoot lessons, what can methods belong to? Mark
for Review

(Choose all correct answers)

1. Galleries
2. Classes (*)
3. Scenarios
4. Objects (*)
5. All of the above

39. From your Greenfoot lessons, which of the following is not a


characteristic of a static method? Mark for Review

1. Belongs to a class itself


2. Belongs to an instance itself (*)
3. Available for other classes to use with dot notation
4. Signature contains the word static
5. Is a method

40. From your Greenfoot lessons, which of the following comparison


operators represents "greater than"? Mark for Review

1. > (*)
2. <
3. ==
4. !=
41. From your Greenfoot lessons, which programming statement creates a new Duke
object, and places it at x = 120, y = 100 in the world? Mark for Review

1. addObject (new Duke( ), 120, 100); (*)


2. addClass (new Duke( ), 120, 100);
3. addWorld (new Duke( ), 120, 100);
4. Move(120,100);

42. From your Greenfoot lessons, source code is written in the Code editor.
True or false? Mark for Review

1. True (*)
2. False

43. From your Greenfoot lessons, where do you review a class's inherited
methods? Mark for Review

1. Act method
2. Documentation (*)
3. Inspector
4. If-statement

44. In a Greenfoot loop constructor, which component is a counter that


controls how many times the statement is executed? Mark for Review

1. Local loop
2. While loop
3. Loop variable (*)
4. Condition

45. From your Greenfoot lessons, what types of values cannot be stored in
a local variable? Mark for Review
(Choose all correct answers)

1. Class name
2. Objects
3. Integers
4. World name
5. method (*)

46. From your Greenfoot lessons, which of the following logic operators represents "and"?
Mark for Review

1. &
2. && (*)
3. =
4. !

47. From your Greenfoot lessons, which symbol represents string


concatenation? Mark for Review

1. Symbol &
2. Symbol <
3. Symbol =
4. Symbol + (*)

48. In Greenfoot, dot notation is used to call a _____________ from


another class. Mark for Review

1. Method (*)
2. Class
3. Signature
4. Parameter

49. In Greenfoot, the image below is an example of what construct?


Mark for Review

1. Method
2. Comment
3. Constructor (*)
4. Class
5.
50. In Greenfoot, you may perform the programming tasks of create and
test many times. True or false? Mark for Review

1. True (*)
2. False

1. In Alice, we can avoid object collision using what?

Slowing movements down.


Using math operators. (*) witch of following is
Downloading the Alice3 collision detector app.
Using object detection.
2. From your Alice lessons, which of the following are examples of scenarios?

Conflict and resolution in a play


Process to simulate
Process to demonstrate
Game to play
All of the above (*)
3. In Alice, which of the following is the most likely situation where procedural abstraction could
be used?

Five dogs all need to bark and run at the same time. (*)
One fish needs to swim forward 1 meter.
Two fish say something to each other.
One person moves up 10 meters.
4. In Alice, objects inherit the characteristics of their:

Code
Project
Class (*)
Program
5. In Alice, inheritance means that the superclass inherits its traits from the subclass. True or
false? True False (*)

6. In Alice, which function is used to move an object directly to the center point of another
object?

getObject
getDuration
getDepth
getDistance (*)
7. Do In Order and Do Together are the only control statements available in Alice. True or false?
True False (*)

8. In Alice, once procedures are added to a control statement, they cannot be changed. True or
false? True False (*)

9. Which of the following are examples of comments written in an Alice program?

this.dog move forward 2


this.cat turn left 0.5
Boy runs to the girl. (*)
Cat jumps into the tree and meows for help. (*)
10. In the Alice scene editor, where are the procedures located to precisely position an object?

Right click on the object, then select Procedures. (*)


Right click on the object, then select Remove.
In the gallery of classes.
In the package located in the gallery.
11. Besides invoking a procedure, another way to precisely position an Alice object is to enter
values in the x, y, and z coordinates in the Position property. True or false?

True (*) False

12. Alice objects move relative to the orientation of the person viewing the animation. True or
false? True False (*)

13. The value that a variable holds must be a whole number, not a decimal. True or false?

True False (*)

14. Define the value of the variable NumSpins based on the following math calculation:

NumSpins / 3 = 8

12 24 (*) 8 NumSpins


15. From your Alice lessons, the "Checklist for Animation Completion" does not ask questions
about the scenario and storyboards, because these are not valid parts of the animation creation
process. True or false? True False (*)

6. From your Alice lessons, which control statement executes instructions simultaneously?

Do in order
Count
Variable
Do together (*)
17. In Alice, which of the following instructions roll the Blue Tang fish left 1 meter?

this.blueTang roll Left 1.0 (*)


this.blueTang Left 1.0
this.blueTang Left 1
this.blueTang roll Left 1

18. How do you copy an Alice procedure?

Drag the procedure into the clipboard, then click CTRL + C.


Hold down the control (CTRL) key, then drag the procedure into the clipboard. (*)
Drag the procedure into the clipboard.
Select Copy in the Run menu.

19. Expressions with relational operators produce true and false values. True or false?
True (*) False

20. In Alice, where are arithmetic operators available?

Amount argument (*)


Size argument
Duration argument (*)
Get Distance functions (*)
If control

21. Which of the following is not an example of the logic of an IF control structure?

Play the video three times. (*)


If the play button is pressed, then play the video one time.
If the doorbell rings, then the door opens.
If the bird rings the bell, a treat is dispensed.

22. The condition in a WHILE loop is a boolean expression. True or false?


True (*) False

23. What Alice tool can be used to diagram the If conditional execution statement?

Cause and effect diagram


Process flow diagram (*)
Conditional flow diagram
24. The Alice If control structure requires the false statement to be populated. True or false?
True False (*)

25. A conditional loop is a loop that will continue forever. True or false? True False
(*)

26. From your Greenfoot lessons, the reset button resets the scenario back to its initial
position. True or false? True (*) False

27. In Greenfoot, a subclass is created by right-clicking on a superclass. True or false?

True (*) False

28. From the Greenfoot IDE, where are inherited methods located?

In the computer network


In the Greenfoot image gallery
In the scene editor

29. What does the following Greenfoot programming statement do? turn(18);

Turn the object 36 degrees.


Turn the object 18 degrees. (*)
Turn the object 18 steps forward.
Move the object 18 steps forward.
30. In the Greenfoot IDE, which type of variable allows instances to store information?

Method variable
Instance variable (*)
Class variable
World variable
31. Use your Greenfoot knowldege: Abstraction occurs in many different ways in programming.
True or false? True (*) False

32.From your Greenfoot lessons, abstraction techniques can only be used once in a class's
source code. True or false? True False (*)

33. 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

34. Use your Greenfoot knowledge: A specification of a method is called a


__________________.

Subclass
Class
Signature (*)
Parameter

35. In Greenfoot, dot notation is used to call a _____________ from another class.

Method (*)
Class
Signature
Parameter
36. In Greenfoot, defined methods must be used immediately. True or false?

True False (*)

37. From your Greenfoot lessons, how do you call a defined method?

Call the method from the act method. (*)


Call the method from the defined method.
Write the method in the World superclass.
Write the method in the instance.
Write the method in the source code.

38. From your Greenfoot lessons, to save space in the act method, you can write an entirely
new method below it, called a _____________.

Class method
Instance method
Defined method (*)
World method
Code method

39. When a Greenfoot code segment is executed in an if-statement, each line of code is
executed in sequential order. True or false? True (*) False
40. From your Greenfoot lessons, which type of constructor can be used to automate creation of
Actor instances?

Animal
World (*)
Actor
Vector

41. From your Greenfoot lessons, when does an if-else statement execute it's second code
segment?

When a random number is less than 10.


When an instance is created.
After the first code segment is executed.
If a condition is false. (*)
If a condition is true.

42. From your Greenfoot lessons, which symbol represents string concatenation?

Symbol &
Symbol <
Symbol =
Symbol + (*)

43. How would the following sentence be written in Greenfoot source code? If Duke's leg is
down, and the keyboard key "d" is down...

if (&&isDown ! Greenfoot.isKeyDown("d") )


if (!isDown && Greenfoot.isKeyDown("d") )
if (isDown && Greenfoot.isKeyDown("d") ) (*)
if (!Greenfoot.isKeyDown && isDown("d") )

44. Use your Greenfoot knowledge to answer the question: String concatenation is a way to
avoid having to write additional characters in your source code. True or false?

True (*) False

45. In Greenfoot, which method is used to add a new instance to a scenario when the world is
initialized?

addClass
addWorld
addObject (*)
addInstance

46. In Greenfoot, an if-statement is used to alternate between displaying two images in an


instance. True or false? True False (*)

47. In Greenfoot, a constructor has a void return type. True or false? True False
(*)

48. From your Greenfoot lessons, a problem statement defines the purpose for your game. True
or false? True (*) False

49. In Greenfoot, what type of parameter does the keyDown method expect?

String (*)
Boolean
Integer
Method

50. In Greenfoot, which method checks if a key on the keyboard has been pressed?

keyPress method
keyUp method
keyDown method (*)
keyClick method
MIDTERM

1. Examine the following code. What are the variables?


args

n (*)

i (*)

t

2. In Java, which symbol is used to assign one value to another?

<

>

= (*)

//
3. Alice uses built-in math operators; they are:

Add and subtract

Multiply and divide

All of the above (*)

None of the above

4. In Alice, functions are dragged into the control statement, not the procedure. True or false?

True False (*)

5. From your Alice lessons, where should comments be placed?

Above each set of programming statements. (*)

At the end of the program.

In the scene editor.

In their own procedure.


6. An Alice object can move in four directions. True or false?

True False (*)

7. From your Alice lessons, comments do not affect the functionality or behavior of objects.
True or false?

True (*) False

8. In Alice, inheritance means that the superclass inherits its traits from the subclass. True or
false?

True False (*)

9. In Alice, declaring a new procedure to shorten code and make it easier to read is a
procedural abstraction technique. True or false

True (*) False

10. In Alice, a person object inherits its procedures, functions, and properties from which of
the following classes

Object subclass

Biped class (*)

Quadruped class

Person subclass (*)


11. A scenario gives the Alice animation a purpose. True or false

True (*) False

12. From your Alice lessons, random numbers are set in the distance and duration arguments
in a procedure. True or false

True (*) False

13. In Alice, which of the following instructions turn the Blue Tang fish right one half of a
meter?

this.blueTang turn Right 5

this.blueTang turn Right 0.5 (*)

blueTang turn Right 5

blueTang turn Right 0.5

14. The move procedure moves an object in how many different possible directions

1

4

3

6 (*)
15. A loop can be infinite (continue forever) or conditional (stops upon a condition). True or
false?

True (*) False

16. In Alice, we use the While control statement to implement the conditional loop. True or
false?

True (*) False

17. A conditional loop is a loop that will continue forever. True or false?

True False (*)

18. The value that a variable holds must be a whole number, not a decimal. True or false?

True False (*)

19. From your Alice lessons, what can be used as a guideline to ensure your animation fulfills
animation principles

The Internet

Animation checklist (*)

A close friend

None of the above

20. An Alice event is considered what?

A party with at least 20 people

An object's orientation


Error handling

A keystroke or mouse click (*)


21. Besides invoking a procedure, another way to precisely position an Alice object is to enter
values in the x, y, and z coordinates in the Position property. True or false

True (*) False

22. From your Alice lessons, what is a one-shot procedural method?

A procedure that is invoked when the Run button is clicked.

A procedure that is used to make a scene adjustment. (*)

A procedure that is dragged into the code editor.

A procedure that is used to launch the program.

23. From your Alice lessons, how do you add an instance to a scene in Alice?

Select the instance from your computer's network.

Write code that places the instance in the scene.

Select the class, then drag the object into the scene. (*)

Call the addObject method.

24. When you want specific code to be executed only if certain conditions are met, what type
of Java construct would you use

while loop
if (*)

array

boolean

25. What do lines 7, 10 and 13 do in the following code?

Export files called A, B, and num3.

Create a single file containing A, B, and the value of num3.

Print "A", "B" and the value of num3 on the screen. (*)

None of the above.

26. From your Greenfoot lessons, abstraction techniques can only be used once in a class's
source code. True or false?
True False (*)

27. From your Greenfoot lessons, which of the following are examples of abstraction?

Playing a range of sounds when keyboard keys are pressed. (*)

A single instance displays a single image.

Assigning a different keyboard key to each instance. (*)

Programming a single movement for a single instance.

Assigning a different image file to each instance. (*)

28. In Greenfoot, a constructor has a void return type. True or false

True False (*)

29. From your Greenfoot lessons, what is the parameter of the following constructor that
creates a new image, and designates it to the Actor class?

setImage (new GreenfootImage("duke100.png

setImage

GreenfootImage

duke100.png (*)

new
30. Use your Greenfoot knowledge to answer the question: Where are defined variables
typically entered in a class's source code

In the defined method in the source code.

Between the constructors and methods in the source code.

After the constructors and methods in the source code.

At the top of the source code, before the constructors and methods. (*)
31. In Greenfoot, a variable can be saved and accessed later, even if the instance no longer
exists. True or false ?

True False (*)

32. From your Greenfoot lessons, when a method needs additional data to perform a task, this
data comes from parameters. True or false?

True (*) False

33. In the Greenfoot IDE, which type of variable allows instances to store information

Method variable

Instance variable (*)

Class variable

World variable

34. From your Greenfoot lessons, how do you call a defined method?

Call the method from the act method. (*)


Call the method from the defined method.

Write the method in the World superclass.

Write the method in the instance.

Write the method in the source code.

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

The world

The act method (*)

The actor class

The gallery

36. From your Greenfoot lessons, to save space in the act method, you can write an entirely
new method below it, called a _____________.

Class method

Instance method

Defined method (*)

World method

Code method

37. Which method is used to play sound in your Greenfoot game


getSound method

findSound method

playSound method (*)

importSound method

38. In Greenfoot, which method checks if a key on the keyboard has been pressed

keyPress method

keyUp method

keyDown method (*)

keyClick method

39. In the Greenfoot IDE, what symbols indicate that the variable is an array?

Square brackets [ ] (*)

Curly brackets { }

Semicolon ;

Colon :

40. In Greenfoot, which of the following statements could prevent an infinite loop from
occurring?

I = 100 + i

i=1
i = i

i = i + 1 (*)

41. In Greenfoot, what happens if the end to a while loop isn't established?

The code will keep executing and will never stop. (*)

The code will execute once and then stop, due to controls in Greenfoot.

The code will prompt you to enter a loop counter.

The code will not execute.

42. In Greenfoot, in which programming task are the objects identified

Define the problem.

Design the solution.

Program the solution. (*)

Test the solution.

43. Use your Greenfoot skills to answer the question. What is incorrect in this code?
Spacing missing

Curly brace missing

Parenthesis missing (*)

Comma missing

44. From your Greenfoot lessons, a problem statement defines the purpose for your game.
True or false

True (*) False

45. From your Greenfoot lessons, where do you review a class's inherited methods

Act method

Documentation (*)

Inspector

If-statement

46. From your Greenfoot lessons, the reset button resets the scenario back to its initial position.
True or false?

True (*) False

47. Which of the following Java syntax is used to correctly create a Duke subclass
private Dog extends World

public class Dog extends World

public class Duke extends Animal (*)

private class extends Actor

private class extends Duke

48. When a Greenfoot code segment is executed in an if-statement, each line of code is
executed in sequential order. True or false? True (*) False

49. In a Greenfoot if-else statement, if the condition is true, the if-statement is executed, and
then the else-statement is executed. True or false

True False (*)

50. Read the following method signature. Using your Greenfoot experience, what does this
method do?

public static int getRandomNumber (int limit)

Returns a random number less than 10.

Returns a random coordinate position in the world.

Returns a random number between zero and parameter limit. (*)


Returns a random number for instances in the animal class only.

1. When you want specific code to be executed only if certain conditions are met, what type of
Java construct would you use? Mark for Review

 while loop
 if (*)
 array
 boolean
2. Which of the following is not an example of the logic of an IF control structure? Mark
for Review

 Play the video three times. (*)


 If the play button is pressed, then play the video one time.
 If the doorbell rings, then the door opens.
 If the bird rings the bell, a treat is dispensed.
3. In an Alice program, which code is executed when the Run button is clicked? Mark for
Review

 The code entered in myFirstMethod in the Code editor. (*)


 The code entered in myMethod in the Code editor.
 The code entered in the class's procedure in the procedures tab.
 The one-shot procedures selected in the Scene editor.

4. In Alice, Do In Order and Do Together: Mark for Review

 Are move statements


 Are control statements (*)
 Are complex statements
 None of the above
5. In Alice, the procedures' arguments allow the programmer to adjust the object, motion,
distance amount, and time duration. True or false? Mark for Review

True (*) False

6. In Alice, a computer program requires functions to tell it how to perform the procedure. True
or false? Mark for Review

True False (*)

7. Which of the following is not an Alice variable value type? Mark for Review

 Color
 Decimal Number
 Whole Number
 Function (*)
8. Define the value of the variable LapCount based on the following math calculation: LapCount
+ 10 = 15 Mark for Review

 2
 4
 5 (*)
 15
 10
9. From your Alice lessons, when testing your animation, you should test that comments were
added below each sequence of instructions in the code. True or false? Mark for Review

True False (*)

10. From your Alice lessons, at what point in the animation process do you confirm the items on
the "Checklist for Animation Completion"? Mark for Review

 Before designing the animation.


 During and after the animation process. (*)
 At the beginning of the animation process.
 After adding each procedure to the Code editor.
11. Which of the following is not a type of event listener in Alice? Mark for Review

 Scene Activation/Time
 Cursor (*)
 Keyboard
 Mouse
 Position/Orientation
12. From your Alice lessons, which of the following are types of storyboards? Mark for
Review

 Actual
 Textual (*)
 Factual
 Visual (*)
 Fictional
13. In Alice, you examine code where a bird moves its wings forward and backward while
moving forward simultaneously across the scene. You notice that this set of procedures are
repeated in the Code editor ten times to achieve this motion. How could procedural abstraction
be used to make the code simpler and easier to read? Mark for Review

 Do not make any changes to the code.


 Use the Count control statement to execute the forward motion of the body and up and
down motion of the wings 10 times. (*)
 Use the Scene editor to position the wings so that they are up as the body moves
forward.
 Declare a separate "fly" procedure for the body moving forward and wings moving up
and down. (*)
14. What does a visual storyboard help the reader understand? Mark for Review

 The components of the scene. (*)


 How the initial scene will be set up. (*)
 The actions that will take place. (*)
 The code that is debugged.
15. From your Alice lessons, which programming instruction represents the following
movement: A person moves forward the distance to the table, minus the depth of the person.
Mark for Review

 this.Person move Forward this.Person getDistanceTo this.Table - this.Table getDepth


 this.Table move Forward this.Person getDistanceTo this.Table - this.Table getDepth
 this.Person move Forward this.Person getDistanceTo this.Table + this.Person getDepth
 this.Person move Forward this.Person getDistanceTo this.Table - this.Person getDepth
(*)

16. From your Alice lessons, random numbers are numbers generated by the user with a
pattern in their sequence. True or false? Mark for Review

True False (*)

17. Examine the following code. What are the variables?

 args
 n (*)
 i (*)
 t
18. If the value already exists in the variable it is overwritten by the assignment operator (=).
True or false? Mark for Review

True (*) False

19. From your Alice lessons, the IF control structure can process one true and one false
response. True or false? Mark for Review

True (*) False

20. Alice objects move relative to the orientation of the person viewing the animation. True or
false? Mark for Review

True False (*)


21. In Alice, which of the following programming statements moves the fish forward, the
distance to the rock, minus the depth of the rock? Mark for Review

 this.Fish move forward {this.Rock getDistanceTo this.Fish - this.Fish getDepth}


 this.Fish move forward {this.Fish getDistanceTo this.Rock - this.Rock getDepth} (*)
 this.Fish move forward {this.Rock getDistanceTo this.Fish - this.Fish - 2}
 this.Rock move forward {this.Rock getDistanceTo this.Fish - this.Fish - 2}
22. In Alice, which of the following programming statements moves the cat backward, half the
distance to the bird? Mark for Review

 this.Cat move backward {this.Bird getDistanceTo this.Cat / 2}


 this.Cat move forward {this.Bird getDistanceTo this.Cat / 2}
 this.Bird move forward {this.Bird getDistanceTo this.Cat / 2}
 this.Cat move backward {this.Cat getDistanceTo this.Bird / 2} (*)
23. Which class holds the method that ends a Greenfoot game? Mark for Review

 Greenfoot (*)
 Class
 GreenfootImage
 Actor
24. In Greenfoot, a constructor has a void return type. True or false? Mark for Review

True False (*)

25. In Greenfoot, which method is used to add a new instance to a scenario when the world is
initialized? Mark for Review

 addClass
 addWorld
 addObject (*)
 addInstance
26. From your Greenfoot lessons, when do infinite loops occur? Mark for Review

 When the loop is executed.


 Only in while loops.
 When the end to the code isn't established. (*)
 When the end to the act method isn't established.
27. In Greenfoot, which statement is a correct example of string concatenation? Mark for
Review

 Duke duke = new Duke(keyNames[i], soundNames[i]);


 Duke duke = (keyNames[i], soundNames[i] + ".wav");
 Duke duke = new Duke(keyNames[i], soundNames[i] + ".wav"); (*)
 Duke duke = (soundNames[i] + ".wav");
28. From your Greenfoot lessons, what types of values cannot be stored in a local variable?
Mark for Review
 Class name
 Objects
 Integers
 World name
 method (*)
29.In Greenfoot, which of the following statements could prevent an infinite loop from
occurring? Mark for Review

 I = 100 + i
 i=1
 i=i
 i = i + 1 (*)
30. In Greenfoot, in which programming task are the objects identified? Mark for Review

 Define the problem.


 Design the solution.
 Program the solution. (*)
 Test the solution.

31. The image below is an example of what Greenfoot construct?

 Method (*)
 Constructor
 Conditional
 Class
32. From your Greenfoot lessons, which of the following is an example of changing the
environment during a Q/A test cycle? Mark for Review

Use a different operating system. (*)

Use the mouse instead of the keyboard.

Use symbols instead of numbers.

All of the above.

33. When designing a game in Greenfoot, it helps to define the actions that will take place in a
textual storyboard. True or false? Mark for Review

True (*)False

34. From your Greenfoot lessons, a problem statement defines the purpose for your game. True
or false? Mark for Review

True (*)False
35. In the Greenfoot IDE, which type of variable allows instances to store information? Mark
for Review

 Method variable
 Instance variable (*)
 Class variable
 World variable
36. In the following Greenfoot method signature, which is the method name?

void turnLeft() Mark for Review

 ()
 void
 turnLeft (*)
 Left
37. In Greenfoot, a variable can be saved and accessed later, even if the instance no longer
exists. True or false? Mark for Review

True False (*)

38. What does the following Greenfoot programming statement do?

turn(18); Mark for Review

 Turn the object 36 degrees.


 Turn the object 18 degrees. (*)
 Turn the object 18 steps forward.
 Move the object 18 steps forward.
39. From your Greenfoot lessons, which of the following comparison operators represents
"greater than"? Mark for Review

 > (*)
 <
 ==
 !=
40. From your Greenfoot lessons, when does an if-else statement execute it's second code
segment? Mark for Review

 When a random number is less than 10.


 When an instance is created
 After the first code segment is executed.
 If a condition is false. (*)
 If a condition is true.
41. From your Greenfoot lessons, which type of constructor can be used to automate creation
of Actor instances? Mark for Review

 Animal
 World (*)
 Actor
 Vector
42. From your Greenfoot lessons, classes can only use the methods they have inherited. They
cannot use methods from other classes. True or false? Mark for Review

True False (*)

43. Use your Greenfoot knowldege: Abstraction occurs in many different ways in programming.
True or false? Mark for Review

True (*) False

44. In Greenfoot, defined methods must be used immediately. True or false? Mark for
Review

True False (*)

45. Use your Greenfoot knowledge to answer the question. One reason to write a defined
method in a class is to change the behavior of the class. True or false? Mark for Review

True False (*)

46. In Greenfoot, a subclass is created by right-clicking on a superclass. True or false? Mark


for Review

True (*) False

47. From your Greenfoot lessons, which of the following is not a step to creating a new
subclass? Mark for Review

 Right-click on a superclass.
 Click New subclass...
 Name the class.
 Select an image for the class.
 Program the class to move forward. (*)
48. From your Greenfoot lessons, which of the following methods return the current rotation of
the object? Mark for Review

 World getClass()
 World getWorld()
 int getRotation() (*)
 getXY()
49. In Greenfoot, what happens if the condition is false in an if-statement? Mark for
Review
 The programming statements are executed.
 The if-statement is executed.
 The act method is deleted.
 The programming statements are not executed. (*)
50. Greenfoot does not have tools to record sound. True or false? Mark
for Review

True False (*)

You might also like