Você está na página 1de 690

1.

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

True

False (*)

[Correct] Correct

2. What does a visual storyboard help the reader understand? Mark


for Review
(1) Points

(Choose all correct answers)

The components of the scene. (*)

How the initial scene will be set up. (*)

The actions that will take place. (*)

The code that is debugged.

[Correct] Correct

3. From your Alice lessons, which of the following is a tool to show


the logic of an animation? Mark for Review
(1) Points

Visual storyboard

Flowchart (*)

Pie chart

Scene editor

Class chart
[Correct] Correct

4. From your Alice lessons, inheritance means that the superclass


inherits its traits from the subclass. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

5. Debugging and testing is the process of running the animation one


time, and adjusting the control statements, procedures, and arguments. Mark
for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.


6. 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
(1) Points

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}

[Correct] Correct

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


butterfly forward, double the distance to the tree? Mark for Review
(1) Points
this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree * 2} (*)

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}

this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}

[Correct] Correct

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


Mark for Review
(1) Points

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.

[Correct] Correct

9. Which of the following IF control structures command the blue


tang fish to roll and simultaneously move down if it collides with a shark, or move
forward if it does not collide with a shark? Mark for Review
(1) Points

(*)
[Correct] Correct

10. Which of the following is not an Alice variable value type?


Mark for Review
(1) Points

Color

Decimal Number

Whole Number

Function (*)

[Correct] Correct
11. From your Alice lessons, variables are fixed and cannot be changed. True or
false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

12. From your Alice lessons, what is the purpose of nesting? Mark
for Review
(1) Points

To add more procedures to your program.

To add visual structure to your program. (*)

To add text to your program that tells the viewer what the code does.

To add random movements to your program.


[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

13. Which of the following is not a type of event listener in Alice?


Mark for Review
(1) Points

Scene Activation/Time

Cursor (*)

Keyboard

Mouse

Position/Orientation

[Correct] Correct

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


(1) Points

Are move statements

Are control statements (*)

Are complex statements

None of the above

[Correct] Correct

15. 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) Points

True (*)
False

[Correct] Correct
16. In Alice, a computer program requires functions to tell it how to perform the
procedure. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

17. The condition in a WHILE loop is a boolean expression. True or


false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

Mark for Review


(1) Points

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.

[Correct] Correct

19. Expressions with relational operators produce true and false


values. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

20. Which of the following does not describe variables? Mark for
Review
(1) Points

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

Has a unique name.

Has a type associated with it.

Arranged in rows and columns. (*)

[Correct] Correct
21. From your Alice lessons, animations should be tested by the programmer before
they are considered complete. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

22. From your Alice lessons, if you examined a science process that
had many steps, which of the following is a way that you could apply functional
decomposition to this process? Mark for Review
(1) Points

1. Present the problem as an animation.


2. Further refine and define the tasks needed for each high level step.
3. Identify the high level steps for the science concept.
1. Identify the detailed steps for the science concept.
2. Present the problem as an animation.

1. Present the problem as an animation.

1. Identify the high level steps for the science concept.


2. Further refine and define the tasks needed for each high level step.
3. Present the problem as an animation. (*)

[Correct] Correct

Section 3
(Answer all questions in this section)

23. In Greenfoot, which statement is a correct example of string


concatenation? Mark for Review
(1) Points

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");

[Correct] Correct

24. 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? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

25. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points

A statement that executes one segment of code.

A statement that can execute a section of code multiple times. (*)

A statement that can execute a section of code one time.

A statement that can execute a method multiple times.

[Correct] Correct
26. From your Greenfoot lessons, which of the following logic operators
represents "and"? Mark for Review
(1) Points

&

&& (*)

[Correct] Correct

27. Which of the following type of audience should you ask to play
your Greenfoot game during the testing phase? Mark for Review
(1) Points

Testing

Target (*)

Primary

Programmer

[Correct] Correct
28. 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
(1) Points

True (*)

False

[Correct] Correct

29. Which of the following Java syntax is used to correctly create a


Duke subclass? Mark for Review
(1) Points

private Dog extends World

public class Dog extends World

public class Duke extends Animal (*)

private class extends Actor

private class extends Duke

[Correct] Correct

30. From your Greenfoot lessons, an instance inherits all of the


characteristics of the class, and those characteristics cannot be changed. True or
false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
31. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false? Mark for Review
(1) Points
True (*)

False

[Correct] Correct

32. In Greenfoot, what happens if the condition is false in an if-


statement? Mark for Review
(1) Points

The programming statements are executed.

The if-statement is executed.

The act method is deleted.

The programming statements are not executed. (*)

[Correct] Correct

33. In Greenfoot, only 10 methods can be written for each class in


the Code editor. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

34. From your Greenfoot lessons, the keyDown method is located in


which class? Mark for Review
(1) Points

Actor

Greenfoot (*)

GreenfootImage
World

[Correct] Correct

35. Use your Greenfoot skills to answer the question. What is


incorrect in this code?

Mark for Review


(1) Points

Spacing missing

Curly brace missing

Parenthesis missing (*)

Comma missing

[Correct] Correct
36. In Greenfoot, dot notation is used to call a _____________ from another
class. Mark for Review
(1) Points

Method (*)

Class

Signature

Parameter

[Correct] Correct

37. In Greenfoot, in which programming task are the objects


identified? Mark for Review
(1) Points

Define the problem.


Design the solution.

Program the solution. (*)

Test the solution.

[Correct] Correct

38. From your Greenfoot lessons, instances do not have any memory.
True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

39. From your Greenfoot lessons, which of the following is an example


of a type of data passed through a parameter? Mark for Review
(1) Points

Methods

Classes

Integers (*)

Scenarios

[Correct] Correct

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

True

False (*)
[Correct] Correct
41. In Greenfoot, the properties of an instance can be modified in the
documentation. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

42. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points

(Choose all correct answers)

Galleries

Classes (*)

Scenarios

Objects (*)

All of the above

[Correct] Correct

43. When a Greenfoot code segment is executed in an if-statement,


each line of code is executed in sequential order. True or false? Mark for
Review
(1) Points

True (*)

False

[Correct] Correct
44. 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

True

False (*)

[Correct] Correct

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


characteristic of a static method? Mark for Review
(1) Points

Belongs to a class itself

Belongs to an instance itself (*)

Available for other classes to use with dot notation

Signature contains the word static

Is a method

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.


46. Greenfoot Actor instances get their images from which of the following?
Mark for Review
(1) Points

Their class (*)

Their source code

Their image editor

Their methods

[Correct] Correct
47. Which Greenfoot control operator is used to test if two values
are equal? Mark for Review
(1) Points

>= operator

== operator (*)

= operator

!= operator

[Correct] Correct

48. In Greenfoot, constructors can be used to create new instances of


objects. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

49. To execute a method in your Greenfoot game, where is it called


from? Mark for Review
(1) Points

The world

The act method (*)

The actor class

The gallery

[Correct] Correct

50. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points

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.

[Correct] Correct

Define the value of the variable LapCount based on the following math calculation:
LapCount + 10 = 15 Mark for Review
(1) Points

5 (*)

15

10

[Correct] Correct

2. From your Alice lessons, variables are fixed and cannot be


changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
3. 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

True

False (*)

[Correct] Correct

4. From your Alice lessons, animations should be tested by the


programmer before they are considered complete. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

5. In Alice, objects inherit the characteristics of their: Mark


for Review
(1) Points

Code

Project

Class (*)

Program

[Correct] Correct
6. In Alice, which of the following is the most likely situation where
procedural abstraction could be used? Mark for Review
(1) Points

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.

[Correct] Correct

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

It makes the animation easier to run.

It makes the scene easier to view.

It simplifies code and makes it easier to read. (*)

It allows many objects of a class to use the same procedure. (*)

It can allow subclasses of a superclass to use a procedure. (*)

[Correct] Correct

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


butterfly forward, double the distance to the tree? Mark for Review
(1) Points

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

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}

this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}

[Correct] Correct
9. In Alice, we can avoid object collision using what? Mark for
Review
(1) Points

Slowing movements down.

Using math operators. (*)

Downloading the Alice 3 collision detector app.

Using object detection.

[Correct] Correct

10. An Alice event is considered what? Mark for Review


(1) Points

A party with at least 20 people.

An object's orientation.

Error handling.

A keystroke or mouse click. (*)

[Correct] Correct
11. Which of the following actions would require a control statement to control
animation timing? Mark for Review
(1) Points

(Choose all correct answers)

A biped object walking. (*)

A rock object turning.

A fish swimming. (*)

A bird flying. (*)


[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

12. In Alice, the setVehicle procedure will associate one object to


another. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

13. In Alice, a computer program requires functions to tell it how to


perform the procedure. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

14. From your Alice lessons, built-in functions provide precise


property details for the following areas: Mark for Review
(1) Points

Proximity and size.

Distance to and nesting.

Proximity, size, spatial relation, and point of view. (*)

Proximity and point of view.

[Correct] Correct

15. Expressions with relational operators produce true and false


values. True or false? Mark for Review
(1) Points
True (*)

False

[Correct] Correct
16. Which of the following does not describe variables? Mark for Review
(1) Points

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

Has a unique name.

Has a type associated with it.

Arranged in rows and columns. (*)

[Correct] Correct

17. From your Alice lessons, the IF control structure can process one
true and one false response. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

18. The condition in a WHILE loop is a boolean expression. True or


false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct
19. What do lines 9 and 11 do in the following code?

Mark for Review


(1) Points

Accept user input and store them in the variables num1 and num2. (*)

Scan the next page in the scanner.

Examine a file and scan the next line.

None of the above.

[Incorrect] Incorrect. Refer to Section 2 Lesson 14.

20. Which of the following is an example of nesting in an Alice


program? Mark for Review
(1) Points

Text is nested inside of a comments tile.

Distance, duration, and direction arguments are nested inside of a procedure.

A move procedure is nested inside of a turn procedure.

Five Do Together statements are nested inside of a Do In Order statement. (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

21. All objects in Alice have three dimensional coordinates on which axes?
Mark for Review
(1) Points

(Choose all correct answers)

x (*)

y (*)

z (*)
w

All of the above

[Correct] Correct

22. In Alice, you can define your own procedures for a class, but not
your own functions. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

Section 3
(Answer all questions in this section)

23. From your Greenfoot lessons, the reset button resets the scenario
back to its initial position. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

24. In Greenfoot, you must first create an instance before you create
a class. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
25. In Greenfoot, objects are created from: Mark for Review
(1) Points

Methods

Classes (*)

Signatures

Parameters

[Correct] Correct
26. 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

Use a different operating system.

Use the mouse instead of the keyboard.

Use symbols instead of numbers. (*)

All of the above.

[Correct] Correct

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


another class. Mark for Review
(1) Points

Method (*)

Class

Signature

Parameter
[Correct] Correct

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

True (*)

False

[Correct] Correct

29. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points

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.

[Correct] Correct

30. In Greenfoot, an if-statement is used to alternate between


displaying two images in an instance. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
31. In Greenfoot, constructors can be used to create new instances of objects.
True or false? Mark for Review
(1) Points
True (*)

False

[Correct] Correct

32. Using Greenfoot, how do we change the size and resolution of the
World instance? Mark for Review
(1) Points

Edit the methods in the class.

Edit the values in the constructor. (*)

Delete the instance.

Edit the values in the class's act method.

[Correct] Correct

33. In Greenfoot, which method checks if a key on the keyboard has


been pressed? Mark for Review
(1) Points

keyPress method

keyUp method

keyDown method (*)

keyClick method

[Correct] Correct

34. From your Greenfoot lessons, instances do not have any memory.
True or false? Mark for Review
(1) Points
True

False (*)

[Correct] Correct

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

True

False (*)

[Correct] Correct
36. 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) Points

True (*)

False

[Correct] Correct

37. From your Greenfoot lessons, which of the following is an example


of a type of data passed through a parameter? Mark for Review
(1) Points

Methods

Classes

Integers (*)

Scenarios

[Correct] Correct
38. Using the Greenfoot IDE, which of the following programming
statements tells the object to turn 38 degrees? Mark for Review
(1) Points

move():

move(2);

turn(38); (*)

turn(38):

[Correct] Correct

39. Which of the following type of audience should you ask to play
your Greenfoot game during the testing phase? Mark for Review
(1) Points

Testing

Target (*)

Primary

Programmer

[Correct] Correct

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


return the current rotation of the object? Mark for Review
(1) Points

World getClass()

World getWorld()

int getRotation() (*)

getXY()
[Correct] Correct

41. From your Greenfoot lessons, in an if-statement, the programming statements


written in curly brackets are executed simultaneously. True or false? Mark for
Review
(1) Points

True

False (*)

[Correct] Correct

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

True

False (*)

[Correct] Correct

43. In Greenfoot, which of the following statements could prevent an


infinite loop from occurring? Mark for Review
(1) Points

I = 100 + i

i=1

i = i

i = i + 1 (*)

[Correct] Correct

44. Use your Greenfoot knowledge: An array object holds a single


variable. True or false? Mark for Review
(1) Points
True

False (*)

[Correct] Correct

45. In Greenfoot, what type of symbol is used to connect boolean


expressions? Mark for Review
(1) Points

String concatenation

Logic operators (*)

Integers

Keyboard key names

[Correct] Correct
46. In a Greenfoot loop constructor, which component is a counter that controls
how many times the statement is executed? Mark for Review
(1) Points

Local loop

While loop

Loop variable (*)

Condition

[Correct] Correct

47. When a Greenfoot code segment is executed in an if-statement,


each line of code is executed in sequential order. True or false? Mark for
Review
(1) Points

True (*)
False

[Correct] Correct

48. From your Greenfoot lessons, which axes define an object's


position in a world? Mark for Review
(1) Points

(Choose all correct answers)

x (*)

y (*)

[Correct] Correct

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


operators represents "greater than"? Mark for Review
(1) Points

> (*)

<

= =

! =

[Correct] Correct

50. From your Greenfoot lessons, when does an if-else statement


execute it's second code segment? Mark for Review
(1) Points

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.

[Correct] Correct

1. Which Alice control statement executes a set of procedures simultaneously?


Mark for Review
(1) Points

Together

Do together (*)

Do in order

While

[Correct] Correct

2. Which Alice execution task corresponds with the following


storyboard statement?
Cat rolls to the left. Mark for Review
(1) Points

roll Left 1

this.Cat roll Left 1.0 (*)

Cat roll Left 1

Cat roll Right 1

[Incorrect] Incorrect. Refer to Section 2 Lesson 4.


3. In Alice, control statements are dragged into the Code editor.
True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

4. In Alice, the while control statement executes a set of


procedures a specific number of times. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

5. In Alice, the computer specifies the low and high range values
for the range of numbers from which to pull a randomized number. True or false?
Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

6. In Alice, which of the following arguments could be replaced with


a random number? Mark for Review
(1) Points

(Choose all correct answers)

Distance (*)

Object name
Duration (*)

Direction

Procedure name

[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

1. The list below contains method descriptions. All are correct except which
one? Mark for Review
(1) Points

(Choose all correct answers)

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.

[Correct] Correct

2. 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) Points

An instance

A method (*)

A class

A variable

[Correct] Correct
3. You have a Class representing Cat. A cat can meow, purr, catch
mice, and so on. When you create a new cat, what is it called? Mark for Review
(1) Points

A submethod

A subprogram

An instance (*)

A subclass

A variable class

[Correct] Correct

4. You want a block of code to be executed only once if certain


conditions are met. What type of Java construct would you use? Mark for Review
(1) Points

while loop

if (*)

array

boolean

[Correct] Correct

5. 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) Points

for all loop

do loop

while loop
if (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 14.

6. If you need to repeat a group of Java statements many times,


which Java construct should you use? Mark for Review
(1) Points

(Choose all correct answers)

repeat...until

do while loop (*)

while loop (*)

if

[Correct] Correct

7. Review the code below.

Select the result from the following statements about what happens when the loopVal
>= 5 . Mark for Review
(1) Points

The message "Printing Some Text" will be printed until loopVal is no longer
less than 5.

The variable loopVal is initialized to 0.

The condition loopVal < 5 is tested before executing anything further in the
program. (*)

The condition loopVal < 5 returns a boolean value.

None of the above.

[Incorrect] Incorrect. Refer to Section 2 Lesson 14.


8. Which of the following statements about methods is false? Mark
for Review
(1) Points

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

Methods whose return type is not void are required to include a return
statement specifying what to return.

The order in which methods are listed within the class is not important.

Java does not permit nesting one method definition within another method's
definition.

[Correct] Correct

9. In Java, a function is a method that must return a value. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

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

Mark for Review


(1) Points

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.


[Correct] Correct

11. Consider the following: You want to use the BufferedReader and
InputStreamReader classes to get user input from the command line. Which one of the
following import statements must you use? Mark for Review
(1) Points

import java.awt.*;

import java.buffer.*;

import java.io.*; (*)

import java.io.input.*;

[Correct] Correct

1. The list below describes variables. All are correct except which one? Mark
for Review
(1) Points

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

Has a unique name.

Has a type associated with it.

Arranged in rows and columns. (*)

[Correct] Correct

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

Mark for Review


(1) Points

args

n
i

All of the above are variables. (*)

[Correct] Correct

3. The following are examples of what in Java?


boolean
byte
char
short
int
long
float
double Mark for Review
(1) Points

Types (*)

Expressions

Variables

Specifications

[Correct] Correct

4. The list below displays valid primitive types in Java, except


which one? Mark for Review
(1) Points

boolean

String (*)

long

int
double

[Correct] Correct

5. The list below displays valid arithmetic operators in Java,


except which one? Mark for Review
(1) Points

% (*)

[Correct] Correct

6. Results of arithmetic operations cannot be stored in a variable.


True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

7. Expressions with relational operators produce true and false


values. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct
8. What is the result of the following code?

Mark for Review


(1) Points

x > y : x > y
x < y : x < y

x > y : 1
x < y : 0

x > y : 0
x < y : 1

x > y : true
x < y : false (*)

x > y : false
x < y : true

[Incorrect] Incorrect. Refer to Section 2 Lesson 13.

9. 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 or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

10. What is the output produced by the following code?

Mark for Review


(1) Points

j is 5
k is 5 (*)

j is 10
j is 5
k is 5

j is 10
k is 10

j is 15
k is 15

[Correct] Correct

1. In Alice, what are the forms of a scenario? Mark for Review


(1) Points

(Choose all correct answers)

A section of code to write.

A problem to solve. (*)

A task to perform. (*)

A person to help.

A system to start.

[Correct] Correct

2. An animation gives the scenario a purpose. True or false? Mark


for Review
(1) Points

True

False (*)

[Correct] Correct

3. Breaking down a problem or process into smaller parts makes it


easier to manage. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

4. A textual storyboard helps the reader understand the actions that


will take place during the animation. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

5. Which Alice tool is used to demonstrate the process flow of an


animation? Mark for Review
(1) Points

Visual storyboard

Textual storyboard

Flowchart (*)

World

Pie chart

[Correct] Correct

6. A flowchart is a useful way to illustrate how your Alice


animation's characters will look. True or false? Mark for Review
(1) Points

True
False (*)

[Correct] Correct

7. From your Alice lessons, what does inheritance mean? Mark for
Review
(1) Points

Each class inherits the methods and properties of all classes available in
Alice.

Each superclass inherits the methods and properties of its subclass.

Each subclass inherits the methods and properties of its superclass. (*)

Each class has its own methods and properties that are non-transferable to
any other class.

[Correct] Correct

8. Which of the following would a clown fish object in Alice inherit


from its class? Mark for Review
(1) Points

Fins

Two eyes

Procedures

Functions

All of the above (*)

[Correct] Correct

9. Procedural abstraction may need to be implemented if an object in


Alice needs to perform an action, but there isn't an inherited procedure that
accomplishes that action. True or false? Mark for Review
(1) Points
True (*)

False

[Correct] Correct

10. Which of the following is a reason why procedural abstraction may


be used in programming an animation? Mark for Review
(1) Points

(Choose all correct answers)

The code is too long. (*)

The programmer wants to save the animation.

The code is difficult to read. (*)

The programmer wants to reuse the code. (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 5.

11. In Alice, new procedures are declared in the Scene editor. True
or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

12. In Alice, you could identify when new procedures need to be


declared by reviewing the textual storyboard for the animation. True or false?
Mark for Review
(1) Points

True (*)
False

[Correct] Correct

13. In Alice, which of the following situations could benefit from


declaring a new procedure? Mark for Review
(1) Points

(Choose all correct answers)

An object needs to move forward, then move up 10 meters.

An object needs to say three statements.

An object does not have a default procedure for a motion, such as swimming.
(*)

Multiple objects need to use a motion, such as bunnies hopping. (*)

A single motion, such as walking, takes up a lot of room in myFirstMethod.


(*)

[Correct] Correct

14. In Alice, if only objects that walk on four legs need to use a
procedure, in which superclass would the procedure be declared? Mark for Review
(1) Points

Quadruped (*)

Biped

Swimmer

Prop

[Correct] Correct

1. As the Alice programmer, you render the animation on your own. True or false?
Mark for Review
(1) Points
True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 12.

2. In Alice, what are the forms of a scenario? Mark for Review


(1) Points

(Choose all correct answers)

A section of code to write.

A problem to solve. (*)

A task to perform. (*)

A person to help.

A system to start.

[Incorrect] Incorrect. Refer to Section 2 Lesson 12.

3. What can be used as a guideline to ensure your Alice animation


fulfills animation principles? Mark for Review
(1) Points

The Internet

An animation checklist (*)

A close friend

Other programmers

[Correct] Correct

4. The animation checklist helps you confirm that all elements of


the Alice animation are operating as expected. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 12.

5. Which of the following elements of the Alice animation should be


tested before the animation is considered complete? Mark for Review
(1) Points

Math calculations operate as expected.

Objects move with smooth timing.

Comments are added to each sequence of instructions.

Control statements are operating as expected.

All of the above. (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 12.

6. The Alice animation should be tested throughout development, not


just at the end of the animation's development. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

7. What type of Alice listener object is required to target a mouse-


click on any object in the scene, allowing the user to drag that object around the
scene when the animation is running? Mark for Review
(1) Points

addDefaultManipulation procedure
addMouseListener procedure

addDefaultModelManipulation procedure (*)

addListener procedure

[Incorrect] Incorrect. Refer to Section 2 Lesson 12.

8. In which Alice class is the addDefaultModelManipulation procedure


located? Mark for Review
(1) Points

Object class

Scene class (*)

myFirstMethod class

Quadruped class

[Correct] Correct

9. When presenting your Alice animation, ensure that your


presentation is thoroughly tested and complete. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 12.

10. When presenting your Alice animation, it is not important to give


the audience a reason to listen to the presentation. True or false? Mark for
Review
(1) Points

True
False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 12.

Section 1
(Answer all questions in this section)

1. Which Alice control statement executes a set of procedures


simultaneously? Mark for Review
(1) Points

Together

Do together (*)

Do in order

While

Correct Correct

2. Which Alice execution task corresponds with the following


storyboard statement?
Cat rolls to the left. Mark for Review
(1) Points

roll Left 1

this.Cat roll Left 1.0 (*)

Cat roll Left 1

Cat roll Right 1

Correct Correct

3. In Alice, control statements are dragged into the Code editor.


True or false? Mark for Review
(1) Points
True (*)

False

Correct Correct

4. In Alice, the while control statement executes a set of


procedures a specific number of times. True or false? Mark for Review
(1) Points

True

False (*)

Correct Correct

5. In Alice, the computer specifies the low and high range values
for the range of numbers from which to pull a randomized number. True or false?
Mark for Review
(1) Points

True

False (*)

Incorrect Incorrect. Refer to Section 2 Lesson 4.

6. In Alice, which of the following arguments could be replaced with


a random number? Mark for Review
(1) Points

(Choose all correct answers)

Distance (*)

Object name

Duration (*)

Direction
Procedure name

Incorrect Incorrect. Refer to Section 2 Lesson 4.

Section 1
(Answer all questions in this section)

1. In Alice, what are the forms of a scenario? Mark for Review


(1) Points

(Choose all correct answers)

A section of code to write.

A problem to solve. (*)

A task to perform. (*)

A person to help.

A system to start.

Correct Correct

2. An animation gives the scenario a purpose. True or false? Mark


for Review
(1) Points

True

False (*)

Correct Correct

3. Breaking down a problem or process into smaller parts makes it


easier to manage. True or false? Mark for Review
(1) Points

True (*)
False

Correct Correct

4. A textual storyboard helps the reader understand the actions that


will take place during the animation. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

5. Which Alice tool is used to demonstrate the process flow of an


animation? Mark for Review
(1) Points

Visual storyboard

Textual storyboard

Flowchart (*)

World

Pie chart

Correct Correct

6. A flowchart is a useful way to illustrate how your Alice


animation's characters will look. True or false? Mark for Review
(1) Points

True

False (*)
Correct Correct

7. From your Alice lessons, what does inheritance mean? Mark for
Review
(1) Points

Each class inherits the methods and properties of all classes available in
Alice.

Each superclass inherits the methods and properties of its subclass.

Each subclass inherits the methods and properties of its superclass. (*)

Each class has its own methods and properties that are non-transferable to
any other class.

Incorrect Incorrect. Refer to Section 2 Lesson 5.

8. Which of the following would a clown fish object in Alice inherit


from its class? Mark for Review
(1) Points

Fins

Two eyes

Procedures

Functions

All of the above (*)

Incorrect Incorrect. Refer to Section 2 Lesson 5.

9. Procedural abstraction may need to be implemented if an object in


Alice needs to perform an action, but there isn't an inherited procedure that
accomplishes that action. True or false? Mark for Review
(1) Points

True (*)
False

Correct Correct

10. Which of the following is a reason why procedural abstraction may


be used in programming an animation? Mark for Review
(1) Points

(Choose all correct answers)

The code is too long. (*)

The programmer wants to save the animation.

The code is difficult to read. (*)

The programmer wants to reuse the code. (*)

Incorrect Incorrect. Refer to Section 2 Lesson 5.

11. In Alice, new procedures are declared in the Scene editor. True
or false? Mark for Review
(1) Points

True

False (*)

Incorrect Incorrect. Refer to Section 2 Lesson 5.

12. In Alice, you could identify when new procedures need to be


declared by reviewing the textual storyboard for the animation. True or false?
Mark for Review
(1) Points

True (*)

False

Correct Correct
13. In Alice, which of the following situations could benefit from
declaring a new procedure? Mark for Review
(1) Points

(Choose all correct answers)

An object needs to move forward, then move up 10 meters.

An object needs to say three statements.

An object does not have a default procedure for a motion, such as swimming.
(*)

Multiple objects need to use a motion, such as bunnies hopping. (*)

A single motion, such as walking, takes up a lot of room in myFirstMethod.


(*)

Incorrect Incorrect. Refer to Section 2 Lesson 5.

14. In Alice, if only objects that walk on four legs need to use a
procedure, in which superclass would the procedure be declared? Mark for Review
(1) Points

Quadruped (*)

Biped

Swimmer

Prop

Correct Correct

Section 1
(Answer all questions in this section)

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


Mark for Review
(1) Points
Do In Order

While

Count

Move (*)

Correct Correct

2. In Alice, which control statement is used to invoke simultaneous


movement? Mark for Review
(1) Points

Do Together (*)

Do In Order

While

Count

Variable

Incorrect Incorrect. Refer to Section 2 Lesson 6.

3. In Alice, a walking motion for a bipedal object can be achieved


without the Do Together control statement. True or false? Mark for Review
(1) Points

True

False (*)

Correct Correct

4. In Alice, different programming is not required for different


objects, because all objects move the same way. True or false? Mark for Review
(1) Points
True

False (*)

Correct Correct

5. In Alice, when two objects are synchronized and move together,


this means that one object is: Mark for Review
(1) Points

A vehicle of another (*)

A class of another

An object of another

An instance of another

Correct Correct

6. In Alice, which procedure is used to assign one object as the


vehicle of another? Mark for Review
(1) Points

setClassVehicle

setObjectVehicle

setVehicle (*)

Vehicle

Section 1
(Answer all questions in this section)

1. In Alice, the If control structure can process one true and one
false response. True or false? Mark for Review
(1) Points

True (*)
False

Correct Correct

2. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True

False (*)

Incorrect Incorrect. Refer to Section 2 Lesson 8.

3. A conditional loop is a loop that will continue forever. True or


false? Mark for Review
(1) Points

True

False (*)

Correct Correct

4. In Alice, we use the While control statement to implement the


conditional loop. True or false? Mark for Review
(1) Points

True (*)

False

Incorrect Incorrect. Refer to Section 2 Lesson 8.

1. An example of an expression is: Mark for Review


(1) Points

"I feel happy."


If or Where

3x3=9 (*)

Move forward 1 meter

Incorrect Incorrect. Refer to Section 2 Lesson 9.

2. Alice uses built-in math operators. They are: Mark for Review
(1) Points

Add

Subtract

Multiply

Divide

All of the above (*)

Correct Correct

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


alien backward the distance to the asteroid, minus 2 meters? Mark for Review
(1) Points

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}

Correct Correct
4. In Alice, which of the following programming statements moves the
cat forward the distance to the bird? Mark for Review
(1) Points

this.Cat move forward {this.Bird getDistanceTo this.Cat / 2}

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

this.Bird move forward {this.Bird getDistanceTo this.Cat}

this.Cat move forward {this.Cat getDistanceTo this.Bird} (*)

Correct Correct

1. Which is an example of the Boolean variable type? Mark for Review


(1) Points

Hello World

True or False (*)

An object

Correct Correct

2. The initializer of a variable with a TextString value type could


be (select all that apply): Mark for Review
(1) Points

(Choose all correct answers)

"Greetings" (*)

"Howdy" (*)

"4" (*)

None of the above.


Correct Correct

Section 1
(Answer all questions in this section)

1. With keyboard controls, you can create Alice animations where the
user controls an object that interacts with other objects. True or false? Mark
for Review
(1) Points

True (*)

False

Correct Correct

2. Event listeners look for and resopnd to the interactivity of the


computer. True or false? Mark for Review
(1) Points

True

False (*)

Correct Correct

Section 1
(Answer all questions in this section)

1. As the Alice programmer, you render the animation on your own.


True or false? Mark for Review
(1) Points

True

False (*)

Correct Correct

2. In Alice, what are the forms of a scenario? Mark for Review


(1) Points
(Choose all correct answers)

A section of code to write.

A problem to solve. (*)

A task to perform. (*)

A person to help.

A system to start.

Correct Correct

3. What can be used as a guideline to ensure your Alice animation


fulfills animation principles? Mark for Review
(1) Points

The Internet

An animation checklist (*)

A close friend

Other programmers

Correct Correct

4. The animation checklist helps you confirm that all elements of


the Alice animation are operating as expected. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

5. Which of the following elements of the Alice animation should be


tested before the animation is considered complete? Mark for Review
(1) Points

Math calculations operate as expected.

Objects move with smooth timing.

Comments are added to each sequence of instructions.

Control statements are operating as expected.

All of the above. (*)

Correct Correct

6. The Alice animation should be tested throughout development, not


just at the end of the animation's development. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

7. What type of Alice listener object is required to target a mouse-


click on any object in the scene, allowing the user to drag that object around the
scene when the animation is running? Mark for Review
(1) Points

addDefaultManipulation procedure

addMouseListener procedure

addDefaultModelManipulation procedure (*)

addListener procedure

Correct Correct
8. In which Alice class is the addDefaultModelManipulation procedure
located? Mark for Review
(1) Points

Object class

Scene class (*)

myFirstMethod class

Quadruped class

Incorrect Incorrect. Refer to Section 2 Lesson 12.

9. When presenting your Alice animation, ensure that your


presentation is thoroughly tested and complete. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

10. When presenting your Alice animation, it is not important to give


the audience a reason to listen to the presentation. True or false? Mark for
Review
(1) Points

True

False (*)

Correct Correct

Section 1
(Answer all questions in this section)

1. The list below describes variables. All are correct except which
one? Mark for Review
(1) Points
A place in memory where data of a specific type can be stored for later
retrieval and use.

Has a unique name.

Has a type associated with it.

Arranged in rows and columns. (*)

Incorrect Incorrect. Refer to Section 2 Lesson 13.

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

Mark for Review


(1) Points

args

All of the above are variables. (*)

Correct Correct

3. The following are examples of what in Java?


boolean
byte
char
short
int
long
float
double Mark for Review
(1) Points

Types (*)
Expressions

Variables

Specifications

Correct Correct

4. The list below displays valid primitive types in Java, except


which one? Mark for Review
(1) Points

boolean

String (*)

long

int

double

Incorrect Incorrect. Refer to Section 2 Lesson 13.

5. The list below displays valid arithmetic operators in Java,


except which one? Mark for Review
(1) Points

% (*)

Correct Correct
6. Results of arithmetic operations cannot be stored in a variable.
True or false? Mark for Review
(1) Points

True

False (*)

Correct Correct

7. Expressions with relational operators produce true and false


values. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

8. What is the result of the following code?

Mark for Review


(1) Points

x > y : x > y
x < y : x < y

x > y : 1
x < y : 0

x > y : 0
x < y : 1

x > y : true
x < y : false (*)

x > y : false
x < y : true
Correct Correct

9. 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 or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

10. What is the output produced by the following code?

Mark for Review


(1) Points

j is 5
k is 5 (*)

j is 10
j is 5
k is 5

j is 10
k is 10

j is 15
k is 15

Section 1
(Answer all questions in this section)

1. The list below contains method descriptions. All are correct


except which one? Mark for Review
(1) Points

(Choose all correct answers)

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.

Incorrect Incorrect. Refer to Section 2 Lesson 14.

2. 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) Points

An instance

A method (*)

A class

A variable

Correct Correct

3. You have a Class representing Cat. A cat can meow, purr, catch
mice, and so on. When you create a new cat, what is it called? Mark for Review
(1) Points

A submethod

A subprogram

An instance (*)

A subclass

A variable class

Incorrect Incorrect. Refer to Section 2 Lesson 14.

4. You want a block of code to be executed only once if certain


conditions are met. What type of Java construct would you use? Mark for Review
(1) Points
while loop

if (*)

array

boolean

Correct Correct

5. 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) Points

for all loop

do loop

while loop

if (*)

Incorrect Incorrect. Refer to Section 2 Lesson 14.

6. If you need to repeat a group of Java statements many times,


which Java construct should you use? Mark for Review
(1) Points

(Choose all correct answers)

repeat...until

do while loop (*)

while loop (*)

if
Incorrect Incorrect. Refer to Section 2 Lesson 14.

7. Review the code below.

Select the result from the following statements about what happens when the loopVal
>= 5 . Mark for Review
(1) Points

The message "Printing Some Text" will be printed until loopVal is no longer
less than 5.

The variable loopVal is initialized to 0.

The condition loopVal < 5 is tested before executing anything further in the
program. (*)

The condition loopVal < 5 returns a boolean value.

None of the above.

Incorrect Incorrect. Refer to Section 2 Lesson 14.

8. Which of the following statements about methods is false? Mark


for Review
(1) Points

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

Methods whose return type is not void are required to include a return
statement specifying what to return.

The order in which methods are listed within the class is not important.

Java does not permit nesting one method definition within another method's
definition.

Incorrect Incorrect. Refer to Section 2 Lesson 14.

9. In Java, a function is a method that must return a value. True or


false? Mark for Review
(1) Points
True

False (*)

Correct Correct

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

Mark for Review


(1) Points

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.

Correct Correct

11. Consider the following: You want to use the BufferedReader and
InputStreamReader classes to get user input from the command line. Which one of the
following import statements must you use? Mark for Review
(1) Points

import java.awt.*;

import java.buffer.*;

import java.io.*; (*)

import java.io.input.*;

Correct Correct
Section 1
(Answer all questions in this section)

1. Why is it useful to learn Alice 3 and Greenfoot? Mark for


Review
(1) Points

(Choose all correct answers)

They both teach you how to code objects to move. (*)

They both allow you to drag and drop objects. (*)

They both allow you to learn the fundamental ideas in programming by creating
objects in a virtual world. (*)

None of the above

[Correct] Correct

2. Alice is a good introduction to learning how to program for which


of the following reasons?
1. It uses the Alice+ programming language syntax.
2. It is easy to drag and drop objects on the screen rather than type.
3. You learn fundamentals of computer programming by creating animations. Mark
for Review
(1) Points

1 only

2 only

3 only

1, 2, and 3

2 and 3 only (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

3. Which of the following steps is not needed to generate an


animation in Alice or to create a game in Greenfoot? Mark for Review
(1) Points
Test

Implement

Import graphical objects (*)

Create a scenario

Design a storyboard

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

4. When designing the scenario for a game or animation, what


questions should you answer? Mark for Review
(1) Points

(Choose all correct answers)

What programming constructs are needed?

What objects are needed? (*)

What actions should take place? (*)

What story is to be told? (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

5. The list below provides good characteristics of a team, except


which one? Mark for Review
(1) Points

Shared responsibility

Clear roles

Clearly defined tasks

Regular participation
A single leader (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

6. Which of the following components can help a team be successful?


1. A common goal
2. Shared responsibility
3. A project plan clearly defining roles and tasks
4. Equal participation and attendance at all meetings Mark for Review
(1) Points

1 only

1 and 2 only

1, 2, and 3 only

1, 2, 3, and 4 (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

7. In a team assessment rubric, which of the following would earn a


4 (the highest score) in the Collaboration category? Mark for Review
(1) Points

Rarely listens to, shares with, and supports the efforts of others. Often is
not a good team player.

Almost always listens to, shares with, and supports the efforts of others.
Tries to keep people working well together and mentors team members when
appropriate. (*)

Usually listens to, shares, with, and supports the efforts of others. Does
not cause "waves" in the group.

Often listens to, shares with, and supports the efforts of others, but not
always.

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

8. In a team assessment rubric, which of the following would earn a


1 (the lowest score) in the attitude category? Mark for Review
(1) Points

Is often publicly critical of the project or the work of other members of the
group. Is often negative about the task(s). (*)

Is rarely publicly critical of the project or the work of others. Often has a
positive attitude about the task(s).

Is never publicly critical of the project or the work of others. Always has a
positive attitude about the task(s).

Is occasionally publicly critical of the project or the work of other members


of the group. Usually has a positive attitude about the task(s).

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

9. The following provides examples of a team rubric, except which


one? Mark for Review
(1) Points

Ensures that there will be no errors in the project. (*)

Set of rules and standards.

Helps the team meet its criteria for success.

Defined by the team.

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

10. Why might you create a journal for programming?


1. To document new concepts and techniques.
2. To track problems in your code and how you solved them.
3. To serve as a review guide when preparing for an exam. Mark for Review
(1) Points

1 only

2 only

2 and 3 only
1, 2, and 3 (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

11. What kind of information is useful in a programming journal?


Mark for Review
(1) Points

New programming concepts

Problems encountered and how you solved them

Both 1 and 2 (*)

Neither 1 nor 2

[Correct] Correct

12. Which of the following is not a good tip for protecting


information and systems (cyber security)? Mark for Review
(1) Points

Share strong passwords. (*)

Keep anti-virus software up-to-date.

Only open emails from trusted sources.

Follow your organization's cybersecurity rules and report issues when they
happen.

[Correct] Correct

13. Which of the following is an example of behaving ethically


online? Mark for Review
(1) Points

Copying and pasting parts of someone else?s work into your own without giving
them credit.
Posting information about people at school that they would never want shared.

Pretending you are someone else in an online chat room.

Starting a cruel social network page about members of the community.

Refraining from using rude or bad language online. (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

Page 1 of 1

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. Why is it useful to learn Alice 3 and Greenfoot? Mark for


Review
(1) Points

(Choose all correct answers)

They both teach you how to code objects to move. (*)

They both allow you to drag and drop objects. (*)

They both allow you to learn the fundamental ideas in programming by creating
objects in a virtual world. (*)

None of the above

[Correct] Correct

2. Alice is a good introduction to learning how to program for which


of the following reasons?
1. It uses the Alice+ programming language syntax.
2. It is easy to drag and drop objects on the screen rather than type.
3. You learn fundamentals of computer programming by creating animations. Mark
for Review
(1) Points
1 only

2 only

3 only

1, 2, and 3

2 and 3 only (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

3. Which of the following steps is not needed to generate an


animation in Alice or to create a game in Greenfoot? Mark for Review
(1) Points

Test

Implement

Import graphical objects (*)

Create a scenario

Design a storyboard

[Correct] Correct

4. When designing the scenario for a game or animation, what


questions should you answer? Mark for Review
(1) Points

(Choose all correct answers)

What programming constructs are needed?

What objects are needed? (*)

What actions should take place? (*)


What story is to be told? (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

5. The list below provides good characteristics of a team, except


which one? Mark for Review
(1) Points

Shared responsibility

Clear roles

Clearly defined tasks

Regular participation

A single leader (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

6. Which of the following components can help a team be successful?


1. A common goal
2. Shared responsibility
3. A project plan clearly defining roles and tasks
4. Equal participation and attendance at all meetings Mark for Review
(1) Points

1 only

1 and 2 only

1, 2, and 3 only

1, 2, 3, and 4 (*)

[Correct] Correct

7. In a team assessment rubric, which of the following would earn a


4 (the highest score) in the Collaboration category? Mark for Review
(1) Points
Rarely listens to, shares with, and supports the efforts of others. Often is
not a good team player.

Almost always listens to, shares with, and supports the efforts of others.
Tries to keep people working well together and mentors team members when
appropriate. (*)

Usually listens to, shares, with, and supports the efforts of others. Does
not cause "waves" in the group.

Often listens to, shares with, and supports the efforts of others, but not
always.

[Correct] Correct

8. In a team assessment rubric, which of the following would earn a


1 (the lowest score) in the attitude category? Mark for Review
(1) Points

Is often publicly critical of the project or the work of other members of the
group. Is often negative about the task(s). (*)

Is rarely publicly critical of the project or the work of others. Often has a
positive attitude about the task(s).

Is never publicly critical of the project or the work of others. Always has a
positive attitude about the task(s).

Is occasionally publicly critical of the project or the work of other members


of the group. Usually has a positive attitude about the task(s).

[Correct] Correct

9. The following provides examples of a team rubric, except which


one? Mark for Review
(1) Points

Ensures that there will be no errors in the project. (*)

Set of rules and standards.

Helps the team meet its criteria for success.


Defined by the team.

[Correct] Correct

10. Why might you create a journal for programming?


1. To document new concepts and techniques.
2. To track problems in your code and how you solved them.
3. To serve as a review guide when preparing for an exam. Mark for Review
(1) Points

1 only

2 only

2 and 3 only

1, 2, and 3 (*)

[Correct] Correct

11. What kind of information is useful in a programming journal?


Mark for Review
(1) Points

New programming concepts

Problems encountered and how you solved them

Both 1 and 2 (*)

Neither 1 nor 2

[Correct] Correct

12. Which of the following is not a good tip for protecting


information and systems (cyber security)? Mark for Review
(1) Points

Share strong passwords. (*)


Keep anti-virus software up-to-date.

Only open emails from trusted sources.

Follow your organization's cybersecurity rules and report issues when they
happen.

[Correct] Correct

13. Which of the following is an example of behaving ethically


online? Mark for Review
(1) Points

Copying and pasting parts of someone else?s work into your own without giving
them credit.

Posting information about people at school that they would never want shared.

Pretending you are someone else in an online chat room.

Starting a cruel social network page about members of the community.

Refraining from using rude or bad language online. (*)

[Correct] Correct

Section 1
(Answer all questions in this section)

1. What do moving objects provide to your scene? Mark for Review


(1) Points

The sky and ground

The action (*)

The procedures

The non-moving scenery


[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

2. In Alice, where are objects added and positioned in the scene?


Mark for Review
(1) Points

The Code editor

The gallery

The Scene editor (*)

The template

[Correct] Correct

3. Which button is selected in the Alice file menu to save a version


of an animation? Mark for Review
(1) Points

File

New

Save As... (*)

Open

[Correct] Correct

4. Alice 3 will periodically remind you to save your project. True


or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.


5. In Alice, once an instance is added to the scene, it cannot be
deleted. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

6. When is an instance created in Alice? Mark for Review


(1) Points

After the code is created.

After the scenario is saved.

After the folder is selected in the gallery.

After the class icon is dragged into the scene. (*)

[Correct] Correct

7. Creating multiple versions of your Alice project saves time. True


or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

8. After objects are positioned in the scene, it is wise to save


multiple versions of the project, giving each version the same name. True or false?
Mark for Review
(1) Points

True
False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

9. How do you create a programming instruction in Alice? Mark


for Review
(1) Points

Click and drag the desired programming instruction into the Procedures tab.

Click and drag the desired programming instruction into the myFirstMethod
tab. (*)

Click and drag the desired programming instruction into the Scene editor.

Click and drag the desired programming instruction into the Functions tab.

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

10. How do you view the results of procedures entered in the Alice
code editor? Mark for Review
(1) Points

Select the Play button.

Select the Run button. (*)

View the procedures in the gallery.

Save the scene.

[Correct] Correct

11. Copying programming instructions saves time when programming your


Alice project. True or false? Mark for Review
(1) Points

True (*)
False

[Correct] Correct

12. Which option copies a programming instruction to the clipboard?


Mark for Review
(1) Points

Clipboard

Is Enabled

Copy to Clipboard (*)

Paste

[Correct] Correct

13. When something is broken or doesn't work as intended in a


software program, it is referred to as a _________? Mark for Review
(1) Points

Bug (*)

Debug

Error

Code

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

14. Debugging is the process of finding bugs in a software program.


True or false? Mark for Review
(1) Points

True (*)

False
[Correct] Correct

Section 1
(Answer all questions in this section)

1. Saved Alice projects can be opened and edited. True or false?


Mark for Review
(1) Points

True (*)

False

[Correct] Correct

2. Which of the following are ways to open an existing Alice project


file after launching Alice? Mark for Review
(1) Points

(Choose all correct answers)

Click and drag the file from your computer into Alice 3.

Select the project from the My Projects tab. (*)

Browse for the project using the File System tab. (*)

Double-click on the project file name in the folder it is stored in on your


computer.

[Correct] Correct

3. In Alice, where are objects added and positioned in the scene?


Mark for Review
(1) Points

The Code editor

The gallery
The Scene editor (*)

The template

[Correct] Correct

4. In Alice, there is a limit of 10 objects per scene. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

5. In Alice, what does the resize handle style do? Mark for
Review
(1) Points

Simple rotation and movement

Rotate about the x, y, and z axes

Change size of the object and stretch it along the x, y, and z axes (*)

Move along the x, y, and z axes

[Correct] Correct

6. Manually manipulating an Alice object with your cursor is a way


to precisely position an object. True or false? Mark for Review
(1) Points

True

False (*)
[Correct] Correct

7. Which of the following is not an example of a one-shot procedure?


Mark for Review
(1) Points

Roll

Move

Turn

Spin (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

8. Only acting objects have one-shot procedures. True or false?


Mark for Review
(1) Points

True

False (*)

[Correct] Correct

9. When you edit an object's properties in the Scene editor, the


changes do not take effect until the Run button is clicked. True or false? Mark
for Review
(1) Points

True

False (*)

[Correct] Correct

10. One type of object property is an object's position in the scene.


True or false? Mark for Review
(1) Points
True (*)

False

[Correct] Correct

11. Which of the following is not one of the positioning axes used in
Alice 3? Mark for Review
(1) Points

w (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

12. In Alice, where does an instance's axes intersect? Mark for


Review
(1) Points

At the instance's head.

At the instance's feet.

At the instance's center point. (*)

At the world's center point.

[Correct] Correct

13. Which handle style would be used to rotate an object's sub-part


about the x, y, and z axes? Mark for Review
(1) Points

Rotation (*)
Default

Translation

Resize

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

14. Rings will appear around a sub-part indicating how you can
reposition it. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 2

1. To access the Alice Code editor from the Scene editor, which button do you
click? Mark for Review
(1) Points

Access Code Editor

Code Editor

Edit Code (*)

Code

[Correct] Correct

2. The Alice Scene editor contains tools to rotate the camera view.
True or false? Mark for Review
(1) Points

True (*)

False
[Correct] Correct

3. In Alice the Functions tab will display the pre-defined functions


for the selected instance. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

4. The Procedures tab and the Functions tab are the two tabs
available in the Alice methods panel. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

5. Which of the following instructions turns the clown fish left 5


meters? Mark for Review
(1) Points

this.clownFish turn Left 5.0 (*)

this.clownFish turn Left 0.5

this.clownFish turn Left 5

this.Fish turn Left 5

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

6. Which of the following procedures turns an object to face another


object? Mark for Review
(1) Points

turn

turnToFace (*)

orientToUpright

moveToward

[Correct] Correct

7. Which of the following is the default control statement in


myFirstMethod? Mark for Review
(1) Points

Count

Do Together

Do In Order (*)

Comment

[Correct] Correct

8. To add a procedure to myFirstMethod, right-click on the procedure


you wish to add and select the Add button. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

9. The Alice move procedure contains which arguments? Mark for


Review
(1) Points
(Choose all correct answers)

Object

Direction (*)

Amount (*)

Text

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

10. An argument is a value that the procedure uses to complete its


task. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

11. Programming comments do not affect the functionality of your


Alice animation. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

12. What is the first step to entering comments in an Alice program?


Mark for Review
(1) Points

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.

[Correct] Correct

13. Which of the following ways can you alter a procedure in Alice?
Mark for Review
(1) Points

(Choose all correct answers)

Copy (*)

Count

Disable (*)

Reorder (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

14. When you disable a programming instruction, it is still executed


when you run the Alice animation. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

15. After each execution of your Alice animation, what element or


elements could be adjusted in your code? Mark for Review
(1) Points

Control statements

Procedures
Arguments

All of the above (*)

[Correct] Correct

16. It is important to save often while debugging your program. True


or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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


Review
(1) Points

Do In Order

While

Count

Move (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

2. In Alice, which control statement is used to invoke simultaneous


movement? Mark for Review
(1) Points

Do Together (*)

Do In Order

While
Count

Variable

[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

3. In Alice, a walking motion for a bipedal object can be achieved


without the Do Together control statement. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

4. In Alice, different programming is not required for different


objects, because all objects move the same way. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

5. In Alice, when two objects are synchronized and move together,


this means that one object is: Mark for Review
(1) Points

A vehicle of another (*)

A class of another

An object of another

An instance of another
[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

6. In Alice, which procedure is used to assign one object as the


vehicle of another? Mark for Review
(1) Points

setClassVehicle

setObjectVehicle

setVehicle (*)

Vehicle

[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

1. An example of an expression is: Mark for Review


(1) Points

"I feel happy."

If or Where

3x3=9 (*)

Move forward 1 meter

[Incorrect] Incorrect. Refer to Section 2 Lesson 9.

2. Alice uses built-in math operators. They are: Mark for Review
(1) Points

Add

Subtract

Multiply

Divide
All of the above (*)

[Correct] Correct

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


alien backward the distance to the asteroid, minus 2 meters? Mark for Review
(1) Points

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}

[Correct] Correct

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


cat forward the distance to the bird? Mark for Review
(1) Points

this.Cat move forward {this.Bird getDistanceTo this.Cat / 2}

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

this.Bird move forward {this.Bird getDistanceTo this.Cat}

this.Cat move forward {this.Cat getDistanceTo this.Bird} (*)

[Correct] Correct

1. In Alice, where can you view the list of functions available for an object?
Mark for Review
(1) Points

Class description in the Scene editor.

Functions tab in the methods panel. (*)


Instance pull-down menu.

Properties tab in the methods panel.

[Incorrect] Incorrect. Refer to Section 2 Lesson 7.

2. In Alice, functions ask questions about an object. True or false?


Mark for Review
(1) Points

True

False (*)

[Correct] Correct

With keyboard controls, you can create Alice animations where the user controls an
object that interacts with other objects. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

2. Event listeners look for and resopnd to the interactivity of the


computer. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
1. In Alice, the If control structure can process one true and one false
response. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

2. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

3. A conditional loop is a loop that will continue forever. True or


false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 8.

4. In Alice, we use the While control statement to implement the


conditional loop. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 8.


In Alice, the If control structure can process one true and one false
response. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

2. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 8.

3. A conditional loop is a loop that will continue forever. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

4. In Alice, we use the While control statement to implement the


conditional loop. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct
1. Which is an example of the Boolean variable type? Mark for Review
(1) Points

Hello World

True or False (*)

An object

[Correct] Correct

2. The initializer of a variable with a TextString value type could


be (select all that apply): Mark for Review
(1) Points

(Choose all correct answers)

"Greetings" (*)

"Howdy" (*)

"4" (*)

None of the above.

[Incorrect] Incorrect. Refer to Section 2 Lesson 10.

1. In Greenfoot, what happens to an instance when the Act button is


clicked in the environment? Mark for Review
(1) Points

Only one instance moves until the pause button is clicked.

The instance executes all of the programming statements in their class's act
method once. (*)

The instance executes all of the programming statements in their class's act
method repeatedly until the scenario is stopped.
The instance executes all of the programming statements in their class's act
method two times until the scenario is stopped.

The class executes all of the programming statements in their instance's act
method two times until the scenario is stopped.

Correct Correct

2. In Greenfoot, the Run button repeatedly executes all of the


programming statements in the class's act method in sequential order until the
pause button is clicked. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

3. An object is an instance of a class. True or false? Mark for


Review
(1) Points

True (*)

False

Correct Correct

4. In Greenfoot, the class holds the general attributes of an


instance, such as the methods it inherits. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct
5. A subclass has what kind of relationship to a superclass? Mark
for Review
(1) Points

"for-what"

"a-is"

"is-a" (*)

"is-by"

Incorrect Incorrect. Refer to Section 3 Lesson 1.

6. What does an instance of the World class do? Mark for Review
(1) Points

Provide the acting objects for the scenario.

Provide the background scenery for the scenario. (*)

Provide the superclass for acting objects.

Provide the source code for instances.

Incorrect Incorrect. Refer to Section 3 Lesson 1.

7. In Greenfoot, after a subclass is created, what has to occur


before instances can be added to the scenario? Mark for Review
(1) Points

Creation of an instance

Compilation (*)

Creation of source code

Editing of source code


Correct Correct

8. In Greenfoot, after a subclass is created and compiled, you


cannot edit the subclass's source code. True or false? Mark for Review
(1) Points

True

False (*)

Correct Correct

1. In Greenfoot, the move method expects what type of information in


its parameters? Mark for Review
(1) Points

Degrees to turn

True or false response

String statement

Integer of steps to move forward (*)

Correct Correct

2. In Greenfoot, the turn method expects what type of information in


its parameters? Mark for Review
(1) Points

Degrees to turn (*)

True or false response

String statement

Integer of steps to move forward

Parameter void
Incorrect Incorrect. Refer to Section 3 Lesson 2.

3. Using the Greenfoot IDE, only five instances can be added to a


scenario. True or false? Mark for Review
(1) Points

True

False (*)

Correct Correct

4. In Greenfoot, the instance has a source code editor. True or


false? Mark for Review
(1) Points

True

False (*)

Incorrect Incorrect. Refer to Section 3 Lesson 2.

5. In the Greenfoot IDE, an instance's position is on the x and y


coordinates. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

6. In Greenfoot, which of the following options are not possible


when associating an image file with an instance? Mark for Review
(1) Points

Add a video (*)

Draw an image
Import an image

Select an image from the Greenfoot library

Correct Correct

7. An instance variable can be saved and accessed later, even if the


instance no longer exists. True or false? Mark for Review
(1) Points

True

False (*)

Correct Correct

8. A variable is also known as a ____________. Mark for Review


(1) Points

Instance

Class

Field (*)

Syntax

Method

Incorrect Incorrect. Refer to Section 3 Lesson 2.

9. In Greenfoot, the body of the method is located in between which


of the following characters? Mark for Review
(1) Points

Parnetheses ( )

Curly brackets { } (*)


Square brackets [ ]

Asterisks **

Incorrect Incorrect. Refer to Section 3 Lesson 2.

10. In Greenfoot, methods can be called in the act method. When the
Act button is clicked in the environment, the methods in the method body of the act
method are executed. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

1. The list below provides actions you can perform in the Greenfoot code
editor except one. Which one should be removed? Mark for Review
(1) Points

Write source code to tell the class how to act in the scenario.

Review the online Java Library documentation. (*)

Write and edit source code.

Write and edit comments.

Correct Correct

2. The list below displays components of the Greenfoot source code


editor except one. Which one should be removed? Mark for Review
(1) Points

Documentation

Comments
Method body

Instance creator (*)

Class description

Correct Correct

3. In a Greenfoot if-statement, the programming statements that the


if-statement executes are written in curly brackets. True or false? Mark for
Review
(1) Points

True (*)

False

Correct Correct

4. An if-statement requires which type of information returned from


the condition? Mark for Review
(1) Points

Integer

Action

True or false (*)

Method

Incorrect Incorrect. Refer to Section 3 Lesson 3.

5. In Greenfoot, which of the following methods display an object's


orientation? Mark for Review
(1) Points

(Choose all correct answers)

void move()
int getRotation() (*)

int getX() (*)

void turn()

Incorrect Incorrect. Refer to Section 3 Lesson 3.

6. In Greenfoot, which of the following methods return the world


that the instance lives in? Mark for Review
(1) Points

World getClass()

World getWorld() (*)

getRotation()

getXY()

Incorrect Incorrect. Refer to Section 3 Lesson 3.

1. Which of the following is an incorrectly written programming


statement? Mark for Review
(1) Points

move(): (*)

move(2);

turn(25);

turn(2);

Correct Correct

2. Which of the following features of Greenfoot will teach you how


to identify bugs in your program? Mark for Review
(1) Points

Code editor

Compilation (*)

Instance creation

Documentation

Correct Correct

3. In object oriented programming, programmers analyze a problem and


create objects to solve the problem. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

4. From your Greenfoot lessons, Which of the following statements is


most correct? Mark for Review
(1) Points

My program is complete when it compiles.

My program is complete when I add music to it.

My program is complete when it runs and I've tested the code. (*)

My program is complete when I add images to it.

Incorrect Incorrect. Refer to Section 3 Lesson 4.

Section 1
(Answer all questions in this section)

1. Why is it useful to learn Alice 3 and Greenfoot? Mark for


Review
(1) Points

(Choose all correct answers)

They both teach you how to code objects to move. (*)

They both allow you to drag and drop objects. (*)

They both allow you to learn the fundamental ideas in programming by creating
objects in a virtual world. (*)

None of the above

[Correct] Correct

2. Alice is a good introduction to learning how to program for which


of the following reasons?
1. It uses the Alice+ programming language syntax.
2. It is easy to drag and drop objects on the screen rather than type.
3. You learn fundamentals of computer programming by creating animations. Mark
for Review
(1) Points

1 only

2 only

3 only

1, 2, and 3

2 and 3 only (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

3. Which of the following steps is not needed to generate an


animation in Alice or to create a game in Greenfoot? Mark for Review
(1) Points

Test
Implement

Import graphical objects (*)

Create a scenario

Design a storyboard

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

4. When designing the scenario for a game or animation, what


questions should you answer? Mark for Review
(1) Points

(Choose all correct answers)

What programming constructs are needed?

What objects are needed? (*)

What actions should take place? (*)

What story is to be told? (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

5. The list below provides good characteristics of a team, except


which one? Mark for Review
(1) Points

Shared responsibility

Clear roles

Clearly defined tasks

Regular participation

A single leader (*)


[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

6. Which of the following components can help a team be successful?


1. A common goal
2. Shared responsibility
3. A project plan clearly defining roles and tasks
4. Equal participation and attendance at all meetings Mark for Review
(1) Points

1 only

1 and 2 only

1, 2, and 3 only

1, 2, 3, and 4 (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

7. In a team assessment rubric, which of the following would earn a


4 (the highest score) in the Collaboration category? Mark for Review
(1) Points

Rarely listens to, shares with, and supports the efforts of others. Often is
not a good team player.

Almost always listens to, shares with, and supports the efforts of others.
Tries to keep people working well together and mentors team members when
appropriate. (*)

Usually listens to, shares, with, and supports the efforts of others. Does
not cause "waves" in the group.

Often listens to, shares with, and supports the efforts of others, but not
always.

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

8. In a team assessment rubric, which of the following would earn a


1 (the lowest score) in the attitude category? Mark for Review
(1) Points
Is often publicly critical of the project or the work of other members of the
group. Is often negative about the task(s). (*)

Is rarely publicly critical of the project or the work of others. Often has a
positive attitude about the task(s).

Is never publicly critical of the project or the work of others. Always has a
positive attitude about the task(s).

Is occasionally publicly critical of the project or the work of other members


of the group. Usually has a positive attitude about the task(s).

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

9. The following provides examples of a team rubric, except which


one? Mark for Review
(1) Points

Ensures that there will be no errors in the project. (*)

Set of rules and standards.

Helps the team meet its criteria for success.

Defined by the team.

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

10. Why might you create a journal for programming?


1. To document new concepts and techniques.
2. To track problems in your code and how you solved them.
3. To serve as a review guide when preparing for an exam. Mark for Review
(1) Points

1 only

2 only

2 and 3 only

1, 2, and 3 (*)
[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

11. What kind of information is useful in a programming journal?


Mark for Review
(1) Points

New programming concepts

Problems encountered and how you solved them

Both 1 and 2 (*)

Neither 1 nor 2

[Correct] Correct

12. Which of the following is not a good tip for protecting


information and systems (cyber security)? Mark for Review
(1) Points

Share strong passwords. (*)

Keep anti-virus software up-to-date.

Only open emails from trusted sources.

Follow your organization's cybersecurity rules and report issues when they
happen.

[Correct] Correct

13. Which of the following is an example of behaving ethically


online? Mark for Review
(1) Points

Copying and pasting parts of someone else?s work into your own without giving
them credit.

Posting information about people at school that they would never want shared.
Pretending you are someone else in an online chat room.

Starting a cruel social network page about members of the community.

Refraining from using rude or bad language online. (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

Page 1 of 1

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. Why is it useful to learn Alice 3 and Greenfoot? Mark for


Review
(1) Points

(Choose all correct answers)

They both teach you how to code objects to move. (*)

They both allow you to drag and drop objects. (*)

They both allow you to learn the fundamental ideas in programming by creating
objects in a virtual world. (*)

None of the above

[Correct] Correct

2. Alice is a good introduction to learning how to program for which


of the following reasons?
1. It uses the Alice+ programming language syntax.
2. It is easy to drag and drop objects on the screen rather than type.
3. You learn fundamentals of computer programming by creating animations. Mark
for Review
(1) Points

1 only

2 only
3 only

1, 2, and 3

2 and 3 only (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

3. Which of the following steps is not needed to generate an


animation in Alice or to create a game in Greenfoot? Mark for Review
(1) Points

Test

Implement

Import graphical objects (*)

Create a scenario

Design a storyboard

[Correct] Correct

4. When designing the scenario for a game or animation, what


questions should you answer? Mark for Review
(1) Points

(Choose all correct answers)

What programming constructs are needed?

What objects are needed? (*)

What actions should take place? (*)

What story is to be told? (*)


[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

5. The list below provides good characteristics of a team, except


which one? Mark for Review
(1) Points

Shared responsibility

Clear roles

Clearly defined tasks

Regular participation

A single leader (*)

[Incorrect] Incorrect. Refer to Section 1 Lesson 2.

6. Which of the following components can help a team be successful?


1. A common goal
2. Shared responsibility
3. A project plan clearly defining roles and tasks
4. Equal participation and attendance at all meetings Mark for Review
(1) Points

1 only

1 and 2 only

1, 2, and 3 only

1, 2, 3, and 4 (*)

[Correct] Correct

7. In a team assessment rubric, which of the following would earn a


4 (the highest score) in the Collaboration category? Mark for Review
(1) Points

Rarely listens to, shares with, and supports the efforts of others. Often is
not a good team player.
Almost always listens to, shares with, and supports the efforts of others.
Tries to keep people working well together and mentors team members when
appropriate. (*)

Usually listens to, shares, with, and supports the efforts of others. Does
not cause "waves" in the group.

Often listens to, shares with, and supports the efforts of others, but not
always.

[Correct] Correct

8. In a team assessment rubric, which of the following would earn a


1 (the lowest score) in the attitude category? Mark for Review
(1) Points

Is often publicly critical of the project or the work of other members of the
group. Is often negative about the task(s). (*)

Is rarely publicly critical of the project or the work of others. Often has a
positive attitude about the task(s).

Is never publicly critical of the project or the work of others. Always has a
positive attitude about the task(s).

Is occasionally publicly critical of the project or the work of other members


of the group. Usually has a positive attitude about the task(s).

[Correct] Correct

9. The following provides examples of a team rubric, except which


one? Mark for Review
(1) Points

Ensures that there will be no errors in the project. (*)

Set of rules and standards.

Helps the team meet its criteria for success.

Defined by the team.


[Correct] Correct

10. Why might you create a journal for programming?


1. To document new concepts and techniques.
2. To track problems in your code and how you solved them.
3. To serve as a review guide when preparing for an exam. Mark for Review
(1) Points

1 only

2 only

2 and 3 only

1, 2, and 3 (*)

[Correct] Correct

11. What kind of information is useful in a programming journal?


Mark for Review
(1) Points

New programming concepts

Problems encountered and how you solved them

Both 1 and 2 (*)

Neither 1 nor 2

[Correct] Correct

12. Which of the following is not a good tip for protecting


information and systems (cyber security)? Mark for Review
(1) Points

Share strong passwords. (*)

Keep anti-virus software up-to-date.


Only open emails from trusted sources.

Follow your organization's cybersecurity rules and report issues when they
happen.

[Correct] Correct

13. Which of the following is an example of behaving ethically


online? Mark for Review
(1) Points

Copying and pasting parts of someone else?s work into your own without giving
them credit.

Posting information about people at school that they would never want shared.

Pretending you are someone else in an online chat room.

Starting a cruel social network page about members of the community.

Refraining from using rude or bad language online. (*)

[Correct] Correct

Section 1
(Answer all questions in this section)

1. What do moving objects provide to your scene? Mark for Review


(1) Points

The sky and ground

The action (*)

The procedures

The non-moving scenery

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.


2. In Alice, where are objects added and positioned in the scene?
Mark for Review
(1) Points

The Code editor

The gallery

The Scene editor (*)

The template

[Correct] Correct

3. Which button is selected in the Alice file menu to save a version


of an animation? Mark for Review
(1) Points

File

New

Save As... (*)

Open

[Correct] Correct

4. Alice 3 will periodically remind you to save your project. True


or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

5. In Alice, once an instance is added to the scene, it cannot be


deleted. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

6. When is an instance created in Alice? Mark for Review


(1) Points

After the code is created.

After the scenario is saved.

After the folder is selected in the gallery.

After the class icon is dragged into the scene. (*)

[Correct] Correct

7. Creating multiple versions of your Alice project saves time. True


or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

8. After objects are positioned in the scene, it is wise to save


multiple versions of the project, giving each version the same name. True or false?
Mark for Review
(1) Points

True

False (*)
[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

9. How do you create a programming instruction in Alice? Mark


for Review
(1) Points

Click and drag the desired programming instruction into the Procedures tab.

Click and drag the desired programming instruction into the myFirstMethod
tab. (*)

Click and drag the desired programming instruction into the Scene editor.

Click and drag the desired programming instruction into the Functions tab.

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

10. How do you view the results of procedures entered in the Alice
code editor? Mark for Review
(1) Points

Select the Play button.

Select the Run button. (*)

View the procedures in the gallery.

Save the scene.

[Correct] Correct

11. Copying programming instructions saves time when programming your


Alice project. True or false? Mark for Review
(1) Points

True (*)

False
[Correct] Correct

12. Which option copies a programming instruction to the clipboard?


Mark for Review
(1) Points

Clipboard

Is Enabled

Copy to Clipboard (*)

Paste

[Correct] Correct

13. When something is broken or doesn't work as intended in a


software program, it is referred to as a _________? Mark for Review
(1) Points

Bug (*)

Debug

Error

Code

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

14. Debugging is the process of finding bugs in a software program.


True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct
Section 1
(Answer all questions in this section)

1. Saved Alice projects can be opened and edited. True or false?


Mark for Review
(1) Points

True (*)

False

[Correct] Correct

2. Which of the following are ways to open an existing Alice project


file after launching Alice? Mark for Review
(1) Points

(Choose all correct answers)

Click and drag the file from your computer into Alice 3.

Select the project from the My Projects tab. (*)

Browse for the project using the File System tab. (*)

Double-click on the project file name in the folder it is stored in on your


computer.

[Correct] Correct

3. In Alice, where are objects added and positioned in the scene?


Mark for Review
(1) Points

The Code editor

The gallery

The Scene editor (*)


The template

[Correct] Correct

4. In Alice, there is a limit of 10 objects per scene. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

5. In Alice, what does the resize handle style do? Mark for
Review
(1) Points

Simple rotation and movement

Rotate about the x, y, and z axes

Change size of the object and stretch it along the x, y, and z axes (*)

Move along the x, y, and z axes

[Correct] Correct

6. Manually manipulating an Alice object with your cursor is a way


to precisely position an object. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

7. Which of the following is not an example of a one-shot procedure?


Mark for Review
(1) Points

Roll

Move

Turn

Spin (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

8. Only acting objects have one-shot procedures. True or false?


Mark for Review
(1) Points

True

False (*)

[Correct] Correct

9. When you edit an object's properties in the Scene editor, the


changes do not take effect until the Run button is clicked. True or false? Mark
for Review
(1) Points

True

False (*)

[Correct] Correct

10. One type of object property is an object's position in the scene.


True or false? Mark for Review
(1) Points

True (*)
False

[Correct] Correct

11. Which of the following is not one of the positioning axes used in
Alice 3? Mark for Review
(1) Points

w (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

12. In Alice, where does an instance's axes intersect? Mark for


Review
(1) Points

At the instance's head.

At the instance's feet.

At the instance's center point. (*)

At the world's center point.

[Correct] Correct

13. Which handle style would be used to rotate an object's sub-part


about the x, y, and z axes? Mark for Review
(1) Points

Rotation (*)

Default
Translation

Resize

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

14. Rings will appear around a sub-part indicating how you can
reposition it. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 2

1. To access the Alice Code editor from the Scene editor, which button do you
click? Mark for Review
(1) Points

Access Code Editor

Code Editor

Edit Code (*)

Code

[Correct] Correct

2. The Alice Scene editor contains tools to rotate the camera view.
True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct
3. In Alice the Functions tab will display the pre-defined functions
for the selected instance. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

4. The Procedures tab and the Functions tab are the two tabs
available in the Alice methods panel. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

5. Which of the following instructions turns the clown fish left 5


meters? Mark for Review
(1) Points

this.clownFish turn Left 5.0 (*)

this.clownFish turn Left 0.5

this.clownFish turn Left 5

this.Fish turn Left 5

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

6. Which of the following procedures turns an object to face another


object? Mark for Review
(1) Points

turn
turnToFace (*)

orientToUpright

moveToward

[Correct] Correct

7. Which of the following is the default control statement in


myFirstMethod? Mark for Review
(1) Points

Count

Do Together

Do In Order (*)

Comment

[Correct] Correct

8. To add a procedure to myFirstMethod, right-click on the procedure


you wish to add and select the Add button. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

9. The Alice move procedure contains which arguments? Mark for


Review
(1) Points

(Choose all correct answers)

Object
Direction (*)

Amount (*)

Text

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

10. An argument is a value that the procedure uses to complete its


task. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

11. Programming comments do not affect the functionality of your


Alice animation. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

12. What is the first step to entering comments in an Alice program?


Mark for Review
(1) Points

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.

[Correct] Correct

13. Which of the following ways can you alter a procedure in Alice?
Mark for Review
(1) Points

(Choose all correct answers)

Copy (*)

Count

Disable (*)

Reorder (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

14. When you disable a programming instruction, it is still executed


when you run the Alice animation. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

15. After each execution of your Alice animation, what element or


elements could be adjusted in your code? Mark for Review
(1) Points

Control statements

Procedures

Arguments
All of the above (*)

[Correct] Correct

16. It is important to save often while debugging your program. True


or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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


statement?
Cause and effect diagram
Process flow diagram (*)
Conditional flow diagram

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

True False (*)

3. From your Alice lessons, the If control structure can process one true and
one false response. True or false
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?
True (*) False

5. Identify an example of an Alice expression.


"I feel happy."
If or Where
3x3=9 (*)
None of the above

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


Are move statements
Are control statements (*)
Are complex statements
None of the above

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

8. In Alice, functions are dragged into the control statement, not the
procedure. True or false?
True False (*)
9. Do In Order and Do Together are the only control statements available in
Alice. True or false?
True False (*)

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

Code
Project
Class (*)
Program

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

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

Object subclass
Biped class (*)
Quadruped class
Person subclass (*)

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

14. Define the value of the variable LapCount based on the following math
calculation: LapCount + 10 = 15
2
4
5 (*)
15
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?

True (*) 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.
Has a unique name.
Has a type associated with it.
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?
True (*) False

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


object?
Move
Turn
Roll
MoveToward
All of the above (*)
19. All objects in Alice have three dimensional coordinates on which axes?
(Choose all correct answers)
x (*)
y (*)
z (*)
w
All of the above

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

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. Each parameter is listed with its name first, then its data type. True
or false?
True False (*)

23. Which Alice execution task corresponds with the following storyboard
statement?
Cat turns to face mouse.

this.mouse turnToFace this.cat


mouse turnTo cat
this.cat turnToFace this.mouse (*)
cat TurnTo mouse

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


something?
talk
speak
say (*)
audible

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

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

String (*)
Boolean
Integer
Method

27. From your Greenfoot lessons, the keyDown method is located in which
class?
Actor
Greenfoot (*)
GreenfootImage
World

28. From your Greenfoot lessons, if the condition in an if-statement is


true, the first code segment is executed. True or false?
True (*) False

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

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

31. In Greenfoot, you must first create an instance before you create a class.
True or false?
True 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?
True False (*)

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

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?

True (*) False

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

36. In Greenfoot, which of the following statements could prevent an infinite


loop from occurring?
I = 100 + i
i=1
i = i
i = i + 1 (*)

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


concatenation?

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");

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

&
&& (*)
=
!

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

40. 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. (*)

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

When source code is written.


When a new image is added to the class.
When a new instance of the class is created. (*)
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)

x (*)
z
y (*)
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?

True (*) False

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

> (*)
<
= =
! =

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?

True False (*)

46. In the Greenfoot IDE, which of the following is not a property of an


instance?
Position
Inherited methods
Scenario name (*)
Defined methods

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

48. In the Greenfoot IDE, which of the following are components of a parameter?
(Choose all correct answers)

Parameter type (*)


Parameter return
Parameter name (*)
Parameter method
Parameter void

49. From your Greenfoot lessons, what is incorrect in this code example:
setLocation(getX(), (int) (altitude);

Spacing
Capitalization
Parenthesis (*)
Comma

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

Define the problem.


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

Section 2

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


process? Mark for Review
(1) Points

Sell the animation (*)

Define the scenario

Run the animation

Design a storyboard

Program the animation

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

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

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}

this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}

Correct

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

True (*)

False

Correct

4. In Alice, we use the While control statement to implement the conditional


loop. True or false? Mark for Review
(1) Points

True (*)

False

Correct

5. A loop can be infinite (continue forever) or conditional (stops upon a


condition). True or false? Mark for Review
(1) Points

True (*)

False

Section 2

6. In Alice, procedural abstraction is the concept of making code easier to


understand and reuse. True or false? Mark for Review
(1) Points

True (*)

False
Correct

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


the procedure? Mark for Review
(1) Points

MyClownFish class and MySwimmer class

MyClownFish class (*)

MyPajamaFish class, MyClownFish class, and MySwimmer class

Any class with "Fish" in the class name

Incorrect. Refer to Section 2 Lesson 4.

8. 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)

It makes the animation easier to run.

It makes the scene easier to view.

It simplifies code and makes it easier to read. (*)

It allows many objects of a class to use the same procedure. (*)

It can allow subclasses of a superclass to use a procedure. (*)

Incorrect. Refer to Section 2 Lesson 4.

9. In Alice, which of the following instructions move the Blue Tang fish forward
2 meters? Mark for Review
(1) Points

this.blueTang move Forward 0.2

this.blueTang move Forward 2

this.blueTang move Backward 2

this.blueTang move Forward 2.0 (*)

Correct

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

Sequence control

Sequential control (*)

Control order

Order control

Incorrect. Refer to Section 2 Lesson 3.

Section 2

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

playSound

playAudio (*)

playSoundFile

playFile

Incorrect. Refer to Section 2 Lesson 3.

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

True

False (*)

Correct

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

True

False (*)

Incorrect. Refer to Section 2 Lesson 8.

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

False

Incorrect. Refer to Section 2 Lesson 8.

15. Expressions with relational operators produce true and false values. True
or false?
Mark for Review
(1) Points
True (*)
False

Correct

16. Which of the following does not describe variables? Mark for Review
(1) Points

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

Has a unique name.

Has a type associated with it.

Arranged in rows and columns. (*)

Correct

17. From your Alice lessons, a Do Together statement embedded with two move
statements is an example of what? Mark for Review
(1) Points

Harmony

Compilation

Forward thinking

Nesting (*)

Incorrect. Refer to Section 2 Lesson 5.

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

True

False (*)
Incorrect. Refer to Section 2 Lesson 5.

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

True

False (*)

Incorrect. Refer to Section 2 Lesson 5.

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

Proximity and size

Distance to and nesting

Proximity, size, spatial relation, and point of view (*)

Proximity and point of view

Correct

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


structure? Mark for Review
(1) Points

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.

Correct

22. Which of the following statements about methods is false? Mark for Review
(1) Points

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

Methods whose return type is not void are required to include a return
statement specifying what to return.

The order in which methods are listed within the class is not important.

Java does not permit nesting one method definition within another method's
definition.
Incorrect. Refer to Section 2 Lesson 10.

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

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.

Correct

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

(Choose all correct answers)

x (*)

y (*)

z (*)

All of the above

Incorrect. Refer to Section 2 Lesson 2.

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

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.

Correct

Section 3

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

private Dog extends World

public class Dog extends World

public class Duke extends Animal (*)

private class extends Actor

private class extends Duke

Correct

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


Mark for Review
(1) Points

True (*)

False

Correct

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

True (*)

False

Correct

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

True

False (*)

Correct

30. What does the following Greenfoot programming statement do?

turn(18); Mark for Review


(1) Points

Turn the object 36 degrees.


Turn the object 18 degrees. (*)

Turn the object 18 steps forward.

Move the object 18 steps forward.

Correct

Section 3

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

(Choose all correct answers)

Parameter type (*)

Parameter return

Parameter name (*)

Parameter method

Parameter void

Incorrect. Refer to Section 3 Lesson 2.

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

True

False (*)

Correct

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

(Choose all correct answers)

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. (*)

Incorrect. Refer to Section 3 Lesson 9.

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

True

False (*)

Correct

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

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

name of an integer (as int)

name of a keyboard key (as String)

name of the class (as String)

Incorrect. Refer to Section 3 Lesson 7.

Section 3

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

Mark for Review


(1) Points

3 (*)

Incorrect. Refer to Section 3 Lesson 12.

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
Use a different operating system.

Use the mouse instead of the keyboard.

Use symbols instead of numbers. (*)

All of the above.

Incorrect. Refer to Section 3 Lesson 12.

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

True (*)

False

Correct

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

Greenfoot.getRandomNumber(30) Mark for Review


(1) Points

A random number between 1 and 30.

A random number between 0 and 30.

A random number between 0 and 29. (*)

A random number between 1 and 29.

Incorrect. Refer to Section 3 Lesson 5.

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

True

False (*)

Correct

Section 3

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

True (*)

False

Correct

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

True

False (*)

Correct

43. In Greenfoot, a local variable is declared at the beginning of a class. True


or false? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 3 Lesson 10.

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

&

&& (*)

Correct

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) Points

True (*)

False
Correct

Section 3

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

The world

The act method (*)

The actor class

The gallery

Correct

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) Points

True (*)

False

Correct

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) Points

True

False (*)

Incorrect. Refer to Section 3 Lesson 8.

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) Points

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. (*)
Correct

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) Points

True

False (*)

Correct

Section 2

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) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

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


cat backward, half the distance to the bird? Mark for Review
(1) Points

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} (*)

[Correct] Correct

3.

Expressions with relational operators produce true and false values. True or
false?
Mark for Review
(1) Points
True (*)
False

[Correct] Correct

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

True (*)

False

[Correct] Correct

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)

It makes the animation easier to run.

It makes the scene easier to view.

It simplifies code and makes it easier to read. (*)

It allows many objects of a class to use the same procedure. (*)

It can allow subclasses of a superclass to use a procedure. (*)

[Correct] Correct
Section 2

6. In Alice, procedural abstraction is the concept of making code


easier to understand and reuse. True or false? Mark for Review
(1) Points

True (*)
False

[Correct] Correct

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) Points

True (*)

False

[Correct] Correct

8. From your Alice lessons, variables are fixed and cannot be


changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

9. From your Alice lessons, what can be used as a guideline to


ensure your animation fulfills animation principles? Mark for Review
(1) Points

The Internet

Animation checklist (*)

A close friend

None of the above

[Correct] Correct

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

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 8.

Section 2

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


control structure? Mark for Review
(1) Points

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.

[Correct] Correct

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) Points

An instance

A method (*)

A class

A variable

[Incorrect] Incorrect. Refer to Section 2 Lesson 10.


13. A complete Alice instruction includes which of the following
components? Mark for Review
(1) Points

(Choose all correct answers)

Image

Class

Procedure (*)

Direction (*)

Amount (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

this.blueTang roll Left 1.0 (*)

this.blueTang Left 1.0

this.blueTang Left 1

this.blueTang roll Left 1

[Correct] Correct

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

True (*)

False
[Correct] Correct

Section 2

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


Mark for Review
(1) Points

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.

[Correct] Correct

17. From your Alice lessons, an instance's properties cannot be


modified. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

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

True

False (*)

[Correct] Correct

19. What Alice tool can be used to diagram the If conditional


execution statement? Mark for Review
(1) Points
Cause and effect diagram

Process flow diagram (*)

Conditional flow diagram

[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

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

True (*)

False

[Correct] Correct

Section 2

21. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

22. In Alice, which of the following arguments are available to


further refine an object's movements? Mark for Review
(1) Points

(Choose all correct answers)

Object

Distance (*)
Duration (*)

Delay

[Incorrect] Incorrect. Refer to Section 2 Lesson 5.

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

Above each set of programming statements. (*)

At the end of the program.

In the scene editor.

In their own procedure.

[Correct] Correct

24. In Alice, once procedures are added to a control statement, they


cannot be changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

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

True

False (*)

[Correct] Correct
Section 3

26. Which of the following demonstrates a Greenfoot


subclass/superclass relationship? Mark for Review
(1) Points

A dog is a subclass of the cat superclass.

A rose is a subclass of the flower superclass. (*)

A computer is a subclass of a video game superclass.

A single person is a superclass of the human subclass.

[Correct] Correct

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


Mark for Review
(1) Points

(Choose all correct answers)

Run (*)

Act (*)

Speed (*)

Move

Turn

[Correct] Correct

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

True
False (*)

[Correct] Correct

29. From your Greenfoot lessons, which type of constructor can be


used to automate creation of Actor instances? Mark for Review
(1) Points

Animal

World (*)

Actor

Vector

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

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) Points

True

False (*)

[Correct] Correct

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) Points

Write the code.


Inspect the instances.

Review the documentation.

Compile the code. (*)

[Correct] Correct

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


something?

Mark for Review


(1) Points

3 (*)

[Correct] Correct

33. In Greenfoot, you may perform the programming tasks of create and
test many times. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

False (*)

[Correct] Correct

35. In Greenfoot, which method checks if a key on the keyboard has


been pressed? Mark for Review
(1) Points

keyPress method

keyUp method

keyDown method (*)

keyClick method

[Incorrect] Incorrect. Refer to Section 3 Lesson 7.

Section 3

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) Points

True (*)

False

[Correct] Correct

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) Points

True (*)

False
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

38. In Greenfoot, an if-statement is used to alternate between


displaying two images in an instance. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

39. In Greenfoot, a local variable is declared at the beginning of a


class. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

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

I (*)

[Correct] Correct

Section 3

41. In Greenfoot, which of the following statements could prevent an


infinite loop from occurring? Mark for Review
(1) Points

I = 100 + i

i=1

i = i

i = i + 1 (*)

[Correct] Correct

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) Points

True (*)

False

[Correct] Correct

43. To execute a method in your Greenfoot game, where is it called


from? Mark for Review
(1) Points

The world

The act method (*)

The actor class

The gallery

[Incorrect] Incorrect. Refer to Section 3 Lesson 6.

44. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points
True

False (*)

[Correct] Correct

45. In the Greenfoot IDE, which of the following is not a property of


an instance? Mark for Review
(1) Points

Position

Inherited methods

Scenario name (*)

Defined methods

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.


Section 3

46. What does the following Greenfoot programming statement do?

turn(18); Mark for Review


(1) Points

Turn the object 36 degrees.

Turn the object 18 degrees. (*)

Turn the object 18 steps forward.

Move the object 18 steps forward.

[Correct] Correct

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


Mark for Review
(1) Points
orientTo( );

turnAround( );

move ( );

turn( ); (*)

[Correct] Correct

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) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 9.

49. Use your Greenfoot knowldege: Abstraction occurs in many


different ways in programming. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

50. In Greenfoot, what happens if the condition is false in an if-


statement? Mark for Review
(1) Points

The programming statements are executed.

The if-statement is executed.

The act method is deleted.


The programming statements are not executed. (*)

[Correct] Correct

MIDTERM 1 VAR 2

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


� Slowing movements down.
� Using math operators. (*)
� 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 simulateProcess 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 VAR 2

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


� Slowing movements down.
� Using math operators. (*)
� 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 simulateProcess 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

1. A typical application uses various values and these values continuously


change while the program is running. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

2.

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

Mark for Review


(1) Points
True (*)
False

[Correct] Correct

3. In Alice, new procedures that are declared for an instance appear


in the procedures tab in the methods panel. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

4. In Alice, procedural abstraction is the concept of making code


easier to understand and reuse. True or false? Mark for Review
(1) Points

True (*)

False
[Correct] Correct

5. In Alice, a person object inherits its procedures, functions, and


properties from which of the following classes? Mark for Review
(1) Points

(Choose all correct answers)

Object subclass

Biped class (*)

Quadruped class

Person subclass (*)

[Correct] Correct

6. The Alice gallery is a collection of 2D models that can be inserted into the
scene. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

7. From your Alice lessons, how can you locate objects in the Alice
gallery? Mark for Review
(1) Points

(Choose all correct answers)

Look on your computer network.

Browse through the folders of classes. (*)

Import objects.
Search for objects by keyword. (*)

[Correct] Correct

8. Which of the following are steps to use "drag-and-drop"


positioning to position an Alice object in a scene? Mark for Review
(1) Points

Select the object with your cursor.

Using your cursor, position the object in the scene.

Select a handle style.

All of the above (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

9. 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
(1) Points

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}

[Correct] Correct

10. How do you copy an Alice procedure? Mark for Review


(1) Points

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.

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

playSound

playAudio (*)

playSoundFile

playFile

[Correct] Correct

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

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

True (*)

False
[Correct] Correct

14. 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
(1) Points

True

False (*)

[Correct] Correct

15. From your Alice lessons, what can be used as a guideline to


ensure your animation fulfills animation principles? Mark for Review
(1) Points

The Internet

Animation checklist (*)

A close friend

None of the above

[Correct] Correct

16. A flowchart shows what happens in an Alice animation if an action takes


place, or does not take place. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

17. Which of the following does not describe methods? Mark for
Review
(1) Points
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. (*)

[Correct] Correct

18. In Java, a function is a method that returns a value. True or


false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

19. Do In Order and Do Together are the only control statements


available in Alice. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

20. In Alice, once procedures are added to a control statement, they


cannot be changed. True or false? Mark for Review
(1) Points

True

False (*)
[Correct] Correct

21. In Alice, functions are dragged into the control statement, not the
procedure. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

22. In Alice, which function is used to move an object directly to


the center point of another object? Mark for Review
(1) Points

getObject

getDuration

getDepth

getDistance (*)

[Correct] Correct

23. A conditional loop is a loop that will continue forever. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

24. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points
True

False (*)

[Correct] Correct

25. In Alice, we use the While control statement to implement the


conditional loop. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

True

False (*)

[Correct] Correct

27. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

28. What type of parameter does the Greenfoot playSound method


expect? Mark for Review
(1) Points

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

name of an integer (as int)

name of a keyboard key (as String)

name of the class (as String)

[Correct] Correct

29. In Greenfoot, what type of parameter does the keyDown method


expect? Mark for Review
(1) Points

String (*)

Boolean

Integer

Method

[Correct] Correct

30. In the Greenfoot IDE, what symbols indicate that the variable is
an array? Mark for Review
(1) Points

Square brackets [ ] (*)

Curly brackets { }
Semicolon ;

Colon :

[Correct] Correct

31. In Greenfoot, what type of symbol is used to connect boolean expressions?


Mark for Review
(1) Points

String concatenation

Logic operators (*)

Integers

Keyboard key names

[Correct] Correct

32. In Greenfoot, when is a local variable most often used? Mark


for Review
(1) Points

Within the scenario

Within the act method

Within the world constructor

Within loop constructs (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

33. In Greenfoot, constructors can be used to create new instances of


objects. True or false? Mark for Review
(1) Points

True (*)
False

[Correct] Correct

34. 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")); Mark for Review


(1) Points

setImage

GreenfootImage

duke100.png (*)

new

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

35. From your Greenfoot lessons, where should the stop method be
inserted into the source code? Mark for Review
(1) Points

In the defined method.

In the act method. (*)

In the import statement.

In the class header.

[Correct] Correct

36. 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
(1) Points
True (*)

False

[Correct] Correct

37. In Greenfoot, a subclass is created by right-clicking on a


superclass. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

38. In Greenfoot, you must first create an instance before you create
a class. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

39. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points

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.


[Correct] Correct

40. 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) Points

True (*)

False

[Correct] Correct

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

True (*)

False

[Correct] Correct

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


identified? Mark for Review
(1) Points

Define the problem.

Design the solution.

Program the solution. (*)

Test the solution.

[Correct] Correct

43. From your Greenfoot lessons, which of the following is an example


of changing the environment during a Q/A test cycle? Mark for Review
(1) Points

Use a different operating system. (*)

Use the mouse instead of the keyboard.

Use symbols instead of numbers.

All of the above.

[Incorrect] Incorrect. Refer to Section 3 Lesson 12.

44. From your Greenfoot lessons, in an if-statement, the programming


statements written in curly brackets are executed simultaneously. True or false?
Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 3.

45. From your Greenfoot lessons, which axes define an object's


position in a world? Mark for Review
(1) Points

(Choose all correct answers)

x (*)

y (*)

[Correct] Correct

46. When a Greenfoot code segment is executed in an if-statement, each line of


code is executed in sequential order. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

True

False (*)

[Correct] Correct

48. What type of Greenfoot method would be used to turn an object?


Mark for Review
(1) Points

orientTo( );

turnAround( );

move ( );

turn( ); (*)

[Correct] Correct

49. 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) Points

True (*)
False

[Correct] Correct

50. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points

In the computer network

In the Greenfoot image gallery

In the scene editor

In the documentation (*)

[Correct] Correct

1. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

2. In Alice, we use the While control statement to implement the


conditional loop. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

3. A loop can be infinite (continue forever) or conditional (stops


upon a condition). True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

True (*)

False

[Correct] Correct

5. 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) Points

True (*)

False

[Correct] Correct

6. From your Alice lessons, animations should be tested by the programmer before
they are considered complete. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct
7. 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

True (*)

False

[Correct] Correct

8. Which Alice control statement executes a set of procedures in


order? Mark for Review
(1) Points

Do in order (*)

Do together

If

For each in

Variable

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

9. The amount that an Alice object moves is in what metric? Mark


for Review
(1) Points

Feet

Centimeters

Meters (*)

Millimeters

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.


10. In Alice, inheritance means that the superclass inherits its
traits from the subclass. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

11. In Alice, a person object inherits its procedures, functions, and properties
from which of the following classes? Mark for Review
(1) Points

(Choose all correct answers)

Object subclass

Biped class (*)

Quadruped class

Person subclass (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

12. In Alice, objects inherit the characteristics of their: Mark


for Review
(1) Points

Code

Project

Class (*)

Program

[Correct] Correct
13. Alice uses built-in math operators; they are: Mark for Review
(1) Points

Add and subtract

Multiply and divide

All of the above (*)

None of the above

[Correct] Correct

14. In Alice, where are arithmetic operators available? Mark for


Review
(1) Points

(Choose all correct answers)

Amount argument (*)

Size argument

Duration argument (*)

Get Distance functions (*)

If control

[Incorrect] Incorrect. Refer to Section 2 Lesson 9.

15. Results of arithmetic operations cannot be stored in a variable.


True or false? Mark for Review
(1) Points

True

False (*)
[Correct] Correct

16. 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
(1) Points

while loop

if (*)

array

boolean

[Correct] Correct

17. You have a Class representing Cat. Each Cat can meow, purr, catch
mice, and so on. When you create a new cat, what is it called? Mark for Review
(1) Points

A submethod

A subprogram

An instance (*)

A subclass

A variable class

[Correct] Correct

18. From your Alice lessons, once you select an instance, you will
add a class to the scene. True or false? Mark for Review
(1) Points

True

False (*)
[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

19. Which of the following is a procedure to precisely position an


Alice object? Mark for Review
(1) Points

Move

Turn

Roll

MoveToward

All of the above (*)

[Correct] Correct

20. From your Alice lessons, it is valuable to save a version of your


Alice animation scene after objects have been repositioned. True or false? Mark
for Review
(1) Points

True (*)

False

[Correct] Correct

21. From your Alice lessons, if you examined a science process that had many
steps, which of the following is a way that you could apply functional
decomposition to this process? Mark for Review
(1) Points

1. Present the problem as an animation.


2. Further refine and define the tasks needed for each high level step.
3. Identify the high level steps for the science concept.

1. Identify the detailed steps for the science concept.


2. Present the problem as an animation.
Present the problem as an animation.

1. Identify the high level steps for the science concept.


2. Further refine and define the tasks needed for each high level step.
3. Present the problem as an animation. (*)

[Correct] Correct

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


Mark for Review
(1) Points

True

False (*)

[Correct] Correct

23. Which of the following are examples of comments written in an


Alice program? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

24. Do In Order and Do Together are the only control statements


available in Alice. True or false? Mark for Review
(1) Points

True

False (*)
[Correct] Correct

25. In Alice, which function is used to move an object directly to


the center point of another object? Mark for Review
(1) Points

getObject

getDuration

getDepth

getDistance (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 5.

26. From your Greenfoot lessons, which of the following are examples of
abstraction? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

27. Use your Greenfoot knowldege: Abstraction occurs in many


different ways in programming. True or false? Mark for Review
(1) Points

True (*)
False

[Correct] Correct

28. Which method is used to play sound in your Greenfoot game? Mark
for Review
(1) Points

getSound method

findSound method

playSound method (*)

importSound method

[Correct] Correct

29. In Greenfoot, which method checks if a key on the keyboard has


been pressed? Mark for Review
(1) Points

keyPress method

keyUp method

keyDown method (*)

keyClick method

[Correct] Correct

30. Read the following method signature. Using your Greenfoot


experience, what does this method do?

public static int getRandomNumber (int limit) Mark for Review


(1) Points

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.

[Correct] Correct

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

True (*)

False

[Correct] Correct

32. In Greenfoot, you can use comparison operators to compare a


variable to a random number. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

33. In Greenfoot, which of the following are execution controls?


Mark for Review
(1) Points

(Choose all correct answers)

Run (*)

Act (*)

Speed (*)
Move

Turn

[Correct] Correct

34. From your Greenfoot lessons, to create a new instance of the Duke
class, you right-click on the class, then select which of the following commands in
the class menu? Mark for Review
(1) Points

New subclass...

Set image...

new Duke() (*)

Inspect

Remove

[Incorrect] Incorrect. Refer to Section 3 Lesson 1.

35. In Greenfoot, objects are created from: Mark for Review


(1) Points

Methods

Classes (*)

Signatures

Parameters

[Correct] Correct

36. 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
Use a different operating system.

Use the mouse instead of the keyboard.

Use symbols instead of numbers. (*)

All of the above.

[Correct] Correct

37. In Greenfoot, a method with what kind of return type is used to


learn more about an object's orientation? Mark for Review
(1) Points

non-void return type (*)

void return type

object return type

method return type

[Incorrect] Incorrect. Refer to Section 3 Lesson 3.

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

True (*)

False

[Correct] Correct

39. From your Greenfoot lessons, to save space in the act method, you
can write an entirely new method below it, called a _____________. Mark for
Review
(1) Points
Class method

Instance method

Defined method (*)

World method

Code method

[Correct] Correct

40. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

41. From your Greenfoot lessons, where should the stop method be inserted into
the source code? Mark for Review
(1) Points

In the defined method.

In the act method. (*)

In the import statement.

In the class header.

[Correct] Correct

42. 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) Points
True (*)

False

[Correct] Correct

43. In Greenfoot, which method is used to add a new instance to a


scenario when the world is initialized? Mark for Review
(1) Points

addClass

addWorld

addObject (*)

addInstance

[Correct] Correct

44. 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) Points

True

False (*)

[Correct] Correct

45. In the following Greenfoot method signature, which is the method


name?

void turnLeft() Mark for Review


(1) Points

()
void

turnLeft (*)

Left

[Correct] Correct

46. In the Greenfoot IDE, which of the following is not a property of an


instance? Mark for Review
(1) Points

Position

Inherited methods

Scenario name (*)

Defined methods

[Correct] Correct

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


Mark for Review
(1) Points

orientTo( );

turnAround( );

move ( );

turn( ); (*)

[Correct] Correct

48. 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? Mark for Review
(1) Points
True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

49. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points

A statement that executes one segment of code.

A statement that can execute a section of code multiple times. (*)

A statement that can execute a section of code one time.

A statement that can execute a method multiple times.

[Correct] Correct

50. In a Greenfoot loop constructor, which component is a counter


that controls how many times the statement is executed? Mark for Review
(1) Points

Local loop

While loop

Loop variable (*)

Condition

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

1. The Alice If control structure requires the false statement to be populated.


True or false? Mark for Review
(1) Points
True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

2. What Alice tool can be used to diagram the If conditional


execution statement? Mark for Review
(1) Points

Cause and effect diagram

Process flow diagram (*)

Conditional flow diagram

[Correct] Correct

3. In Alice, we use the While control statement to implement the


conditional loop. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

4. In Alice, if a procedure is declared for MyClownFish, which


classes can use the procedure? Mark for Review
(1) Points

MyClownFish class and MySwimmer class

MyClownFish class (*)

MyPajamaFish class, MyClownFish class, and MySwimmer class

Any class with "Fish" in the class name


[Correct] Correct

5. In Alice, new procedures that are declared for an instance appear


in the procedures tab in the methods panel. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

6. 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
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

7. All objects in Alice have three dimensional coordinates on which


axes? Mark for Review
(1) Points

(Choose all correct answers)

x (*)
y (*)

z (*)

All of the above

[Correct] Correct

8. The Alice gallery is a collection of 2D models that can be


inserted into the scene. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

9. Which of the following is a procedure to precisely position an


Alice object? Mark for Review
(1) Points

Move

Turn

Roll

MoveToward

All of the above (*)

[Correct] Correct

10. From your Alice lessons, animations should be tested by the


programmer before they are considered complete. True or false? Mark for Review
(1) Points
True (*)

False

[Correct] Correct

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

The Internet

Animation checklist (*)

A close friend

None of the above

[Correct] Correct

12. Define the value of the variable LapCount based on the following
math calculation: LapCount + 10 = 15 Mark for Review
(1) Points

5 (*)

15

10

[Correct] Correct

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


butterfly forward, double the distance to the tree? Mark for Review
(1) Points
this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree * 2} (*)

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}

this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}

[Correct] Correct

14. From your Alice lessons, which of the following is a tool to show
the logic of an animation? Mark for Review
(1) Points

Visual storyboard

Flowchart (*)

Pie chart

Scene editor

Class chart

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

15. If you need to repeat a group of Java statements many times,


which Java construct should you use? Mark for Review
(1) Points

(Choose all correct answers)

repeat...until

do while loop (*)

while loop (*)

if
[Correct] Correct

16. Java programs can be simple programs that run from the command line, or they
can have complex graphical user interfaces. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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


(1) Points

Are move statements

Are control statements (*)

Are complex statements

None of the above

[Correct] Correct

18. In Alice, once procedures are added to a control statement, they


cannot be changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

19. In Alice, the vehicle property will associate one object to


another. True or false? Mark for Review
(1) Points
True (*)

False

[Correct] Correct

20. In Alice, which of the following arguments are available to


further refine an object's movements? Mark for Review
(1) Points

(Choose all correct answers)

Object

Distance (*)

Duration (*)

Delay

[Correct] Correct

21. The Alice code editor contains the tools you need to set up the
background template and objects in the scene. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

this.blueTang roll Left 1.0 (*)

this.blueTang Left 1.0


this.blueTang Left 1

this.blueTang roll Left 1

[Correct] Correct

23. How do you copy an Alice procedure? Mark for Review


(1) Points

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.

[Correct] Correct

24. If the value already exists in the variable it is overwritten by


the assignment operator (=). True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

25. What is the output produced by the following code?

Mark for Review


(1) Points

j is 5
k is 5 (*)

j is 10
j is 5
k is 5

j is 10
k is 10

j is 15
k is 15

[Incorrect] Incorrect. Refer to Section 2 Lesson 9.

26. From your Greenfoot lessons, which of the following is an example of a type
of data passed through a parameter? Mark for Review
(1) Points

Methods

Classes

Integers (*)

Scenarios

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

27. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points

In the computer network

In the Greenfoot image gallery

In the scene editor

In the documentation (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

28. In Greenfoot, instances inherit the characteristics of the


subclass they belong to, but not the superclass. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

29. Using the Greenfoot IDE, which of the following programming


statements tells the object to turn 38 degrees? Mark for Review
(1) Points

move():

move(2);

turn(38); (*)

turn(38):

[Correct] Correct

30. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct
31. 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

True

False (*)

[Correct] Correct

32. In Greenfoot, what type of parameter does the keyDown method


expect? Mark for Review
(1) Points

String (*)

Boolean

Integer

Method

[Correct] Correct

33. What type of parameter does the Greenfoot playSound method


expect? Mark for Review
(1) Points

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

name of an integer (as int)

name of a keyboard key (as String)

name of the class (as String)

[Correct] Correct
34. 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) Points

True

False (*)

[Correct] Correct

35. Which class holds the method that ends a Greenfoot game? Mark
for Review
(1) Points

Greenfoot (*)

Class

GreenfootImage

Actor

36. Using Greenfoot, how do we change the size and resolution of the
World instance? Mark for Review
(1) Points

Edit the methods in the class.

Edit the values in the constructor. (*)

Delete the instance.

Edit the values in the class's act method.

[Correct] Correct

37. From your Greenfoot lessons, which of the following is an example


of changing the environment during a Q/A test cycle? Mark for Review
(1) Points
Use a different operating system. (*)

Use the mouse instead of the keyboard.

Use symbols instead of numbers.

All of the above.

[Correct] Correct

38. Programming tasks to create a Greenfoot game typically occur in


the following order:

1.Define the problem.


2.Design the solution.
3.Program the solution.
4.Test the solution.

True or false? Mark for Review


(1) Points

True (*)

False

[Correct] Correct

39. In Greenfoot, a subclass is created by right-clicking on a


superclass. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

40. From your Greenfoot lessons, to create a new instance of the Duke
class, you right-click on the class, then select which of the following commands in
the class menu? Mark for Review
(1) Points
New subclass...

Set image...

new Duke() (*)

Inspect

Remove

[Correct] Correct

41. To execute a method in your Greenfoot game, where is it called from? Mark
for Review
(1) Points

The world

The act method (*)

The actor class

The gallery

[Correct] Correct

42. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
43. 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) Points

True (*)

False

[Correct] Correct

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


that controls how many times the statement is executed? Mark for Review
(1) Points

Local loop

While loop

Loop variable (*)

Condition

[Correct] Correct

45. 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? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

46. In Greenfoot, what type of symbol is used to connect boolean expressions?


Mark for Review
(1) Points

String concatenation
Logic operators (*)

Integers

Keyboard key names

[Correct] Correct

47. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points

(Choose all correct answers)

Galleries

Classes (*)

Scenarios

Objects (*)

All of the above

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

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


operators represents "greater than"? Mark for Review
(1) Points

> (*)

<

= =

! =

[Correct] Correct
49. 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

True

False (*)

[Correct] Correct

50. From your Greenfoot lessons, what are the ways that you can view
a class's methods? Mark for Review
(1) Points

(Choose all correct answers)

In the scenario

In the class's documentation (*)

By right-clicking on an instance (*)

In the Greenfoot gallery

[Correct] Correct

MIDTERM 1 VAR 2

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


� Slowing movements down.
� Using math operators. (*)
� 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

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


statement?
Cause and effect diagram
Process flow diagram (*)
Conditional flow diagram

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

True False (*)

3. From your Alice lessons, the If control structure can process one true and
one false response. True or false
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?
True (*) False
5. Identify an example of an Alice expression.
"I feel happy."
If or Where
3x3=9 (*)
None of the above

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


Are move statements
Are control statements (*)
Are complex statements
None of the above

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

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

9. Do In Order and Do Together are the only control statements available in


Alice. True or false?
True False (*)

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

Code
Project
Class (*)
Program

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

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

Object subclass
Biped class (*)
Quadruped class
Person subclass (*)

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

14. Define the value of the variable LapCount based on the following math
calculation: LapCount + 10 = 15
2
4
5 (*)
15
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?

True (*) 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.
Has a unique name.
Has a type associated with it.
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?
True (*) False

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


object?
Move
Turn
Roll
MoveToward
All of the above (*)

19. All objects in Alice have three dimensional coordinates on which axes?
(Choose all correct answers)
x (*)
y (*)
z (*)
w
All of the above

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

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. Each parameter is listed with its name first, then its data type. True
or false?
True False (*)

23. Which Alice execution task corresponds with the following storyboard
statement?
Cat turns to face mouse.

this.mouse turnToFace this.cat


mouse turnTo cat
this.cat turnToFace this.mouse (*)
cat TurnTo mouse

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


something?
talk
speak
say (*)
audible

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

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

String (*)
Boolean
Integer
Method

27. From your Greenfoot lessons, the keyDown method is located in which
class?
Actor
Greenfoot (*)
GreenfootImage
World

28. From your Greenfoot lessons, if the condition in an if-statement is


true, the first code segment is executed. True or false?
True (*) False

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

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

31. In Greenfoot, you must first create an instance before you create a class.
True or false?
True 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?
True False (*)

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

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?

True (*) False

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

36. In Greenfoot, which of the following statements could prevent an infinite


loop from occurring?
I = 100 + i
i=1
i = i
i = i + 1 (*)

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


concatenation?

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");

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

&
&& (*)
=
!

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

40. 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. (*)

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

When source code is written.


When a new image is added to the class.
When a new instance of the class is created. (*)
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)

x (*)
z
y (*)
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?
True (*) False

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

> (*)
<
= =
! =

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?

True False (*)

46. In the Greenfoot IDE, which of the following is not a property of an


instance?

Position
Inherited methods
Scenario name (*)
Defined methods

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

48. In the Greenfoot IDE, which of the following are components of a parameter?
(Choose all correct answers)

Parameter type (*)


Parameter return
Parameter name (*)
Parameter method
Parameter void

49. From your Greenfoot lessons, what is incorrect in this code example:
setLocation(getX(), (int) (altitude);

Spacing
Capitalization
Parenthesis (*)
Comma

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

Define the problem.


Design the solution.
Program the solution. (*)
Test the solution.
Section 2

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


process? Mark for Review
(1) Points

Sell the animation (*)

Define the scenario

Run the animation

Design a storyboard

Program the animation

Correct

2. In Alice, which of the following programming statements moves the butterfly


forward, double the distance to the tree? Mark for Review
(1) Points

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

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}

this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}

Correct

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

True (*)

False

Correct

4. In Alice, we use the While control statement to implement the conditional


loop. True or false? Mark for Review
(1) Points

True (*)

False
Correct

5. A loop can be infinite (continue forever) or conditional (stops upon a


condition). True or false? Mark for Review
(1) Points

True (*)

False

Section 2

6. In Alice, procedural abstraction is the concept of making code easier to


understand and reuse. True or false? Mark for Review
(1) Points

True (*)

False

Correct

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


the procedure? Mark for Review
(1) Points

MyClownFish class and MySwimmer class

MyClownFish class (*)

MyPajamaFish class, MyClownFish class, and MySwimmer class

Any class with "Fish" in the class name

Incorrect. Refer to Section 2 Lesson 4.

8. 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)

It makes the animation easier to run.

It makes the scene easier to view.

It simplifies code and makes it easier to read. (*)

It allows many objects of a class to use the same procedure. (*)

It can allow subclasses of a superclass to use a procedure. (*)

Incorrect. Refer to Section 2 Lesson 4.


9. In Alice, which of the following instructions move the Blue Tang fish forward
2 meters? Mark for Review
(1) Points

this.blueTang move Forward 0.2

this.blueTang move Forward 2

this.blueTang move Backward 2

this.blueTang move Forward 2.0 (*)

Correct

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

Sequence control

Sequential control (*)

Control order

Order control

Incorrect. Refer to Section 2 Lesson 3.

Section 2

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

playSound

playAudio (*)

playSoundFile

playFile

Incorrect. Refer to Section 2 Lesson 3.

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

True

False (*)
Correct

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

True

False (*)

Incorrect. Refer to Section 2 Lesson 8.

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

True (*)

False

Incorrect. Refer to Section 2 Lesson 8.

15. Expressions with relational operators produce true and false values. True
or false?
Mark for Review
(1) Points
True (*)
False

Correct

16. Which of the following does not describe variables? Mark for Review
(1) Points

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

Has a unique name.

Has a type associated with it.

Arranged in rows and columns. (*)

Correct

17. From your Alice lessons, a Do Together statement embedded with two move
statements is an example of what? Mark for Review
(1) Points

Harmony
Compilation

Forward thinking

Nesting (*)

Incorrect. Refer to Section 2 Lesson 5.

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

True

False (*)

Incorrect. Refer to Section 2 Lesson 5.

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

True

False (*)

Incorrect. Refer to Section 2 Lesson 5.

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

Proximity and size

Distance to and nesting

Proximity, size, spatial relation, and point of view (*)

Proximity and point of view

Correct

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


structure? Mark for Review
(1) Points

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.

Correct

22. Which of the following statements about methods is false? Mark for Review
(1) Points

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

Methods whose return type is not void are required to include a return
statement specifying what to return.

The order in which methods are listed within the class is not important.

Java does not permit nesting one method definition within another method's
definition.

Incorrect. Refer to Section 2 Lesson 10.

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

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.

Correct

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

(Choose all correct answers)

x (*)

y (*)

z (*)

All of the above

Incorrect. Refer to Section 2 Lesson 2.


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

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.

Correct

Section 3

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

private Dog extends World

public class Dog extends World

public class Duke extends Animal (*)

private class extends Actor

private class extends Duke

Correct

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


Mark for Review
(1) Points

True (*)

False

Correct

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

True (*)

False

Correct
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

True

False (*)

Correct

30. What does the following Greenfoot programming statement do?

turn(18); Mark for Review


(1) Points

Turn the object 36 degrees.

Turn the object 18 degrees. (*)

Turn the object 18 steps forward.

Move the object 18 steps forward.

Correct

Section 3

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

(Choose all correct answers)

Parameter type (*)

Parameter return

Parameter name (*)

Parameter method

Parameter void

Incorrect. Refer to Section 3 Lesson 2.

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

True
False (*)

Correct

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

(Choose all correct answers)

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. (*)

Incorrect. Refer to Section 3 Lesson 9.

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

True

False (*)

Correct

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

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

name of an integer (as int)

name of a keyboard key (as String)

name of the class (as String)

Incorrect. Refer to Section 3 Lesson 7.

Section 3

36. From your Greenfoot lessons, which line of code is missing something?
Mark for Review
(1) Points

3 (*)

Incorrect. Refer to Section 3 Lesson 12.

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

Use a different operating system.

Use the mouse instead of the keyboard.

Use symbols instead of numbers. (*)

All of the above.

Incorrect. Refer to Section 3 Lesson 12.

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

True (*)

False

Correct

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

Greenfoot.getRandomNumber(30) Mark for Review


(1) Points

A random number between 1 and 30.

A random number between 0 and 30.

A random number between 0 and 29. (*)

A random number between 1 and 29.


Incorrect. Refer to Section 3 Lesson 5.

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

True

False (*)

Correct

Section 3

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

True (*)

False

Correct

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

True

False (*)

Correct

43. In Greenfoot, a local variable is declared at the beginning of a class. True


or false? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 3 Lesson 10.

44. From your Greenfoot lessons, which of the following logic operators
represents "and"? Mark for Review
(1) Points
&

&& (*)

Correct

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) Points

True (*)

False

Correct

Section 3

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

The world

The act method (*)

The actor class

The gallery

Correct

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) Points

True (*)

False

Correct

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) Points

True
False (*)

Incorrect. Refer to Section 3 Lesson 8.

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) Points

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. (*)

Correct

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) Points

True

False (*)

Correct

Section 2

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) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

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


cat backward, half the distance to the bird? Mark for Review
(1) Points
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} (*)

[Correct] Correct

3.

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

Mark for Review


(1) Points
True (*)
False

[Correct] Correct

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

True (*)

False

[Correct] Correct

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)

It makes the animation easier to run.

It makes the scene easier to view.


It simplifies code and makes it easier to read. (*)

It allows many objects of a class to use the same procedure. (*)

It can allow subclasses of a superclass to use a procedure. (*)

[Correct] Correct
Section 2

6. In Alice, procedural abstraction is the concept of making code


easier to understand and reuse. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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) Points

True (*)

False

[Correct] Correct

8. From your Alice lessons, variables are fixed and cannot be


changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

9. From your Alice lessons, what can be used as a guideline to


ensure your animation fulfills animation principles? Mark for Review
(1) Points

The Internet

Animation checklist (*)

A close friend

None of the above

[Correct] Correct

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

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 8.

Section 2

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


control structure? Mark for Review
(1) Points

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.

[Correct] Correct

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) Points

An instance

A method (*)

A class

A variable

[Incorrect] Incorrect. Refer to Section 2 Lesson 10.

13. A complete Alice instruction includes which of the following


components? Mark for Review
(1) Points

(Choose all correct answers)

Image

Class

Procedure (*)

Direction (*)

Amount (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

this.blueTang roll Left 1.0 (*)

this.blueTang Left 1.0

this.blueTang Left 1
this.blueTang roll Left 1

[Correct] Correct

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

True (*)

False

[Correct] Correct

Section 2

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


Mark for Review
(1) Points

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.

[Correct] Correct

17. From your Alice lessons, an instance's properties cannot be


modified. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.


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

True

False (*)

[Correct] Correct

19. What Alice tool can be used to diagram the If conditional


execution statement? Mark for Review
(1) Points

Cause and effect diagram

Process flow diagram (*)

Conditional flow diagram

[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

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

True (*)

False

[Correct] Correct

Section 2

21. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True
False (*)

[Correct] Correct

22. In Alice, which of the following arguments are available to


further refine an object's movements? Mark for Review
(1) Points

(Choose all correct answers)

Object

Distance (*)

Duration (*)

Delay

[Incorrect] Incorrect. Refer to Section 2 Lesson 5.

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

Above each set of programming statements. (*)

At the end of the program.

In the scene editor.

In their own procedure.

[Correct] Correct

24. In Alice, once procedures are added to a control statement, they


cannot be changed. True or false? Mark for Review
(1) Points

True
False (*)

[Correct] Correct

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

True

False (*)

[Correct] Correct

Section 3

26. Which of the following demonstrates a Greenfoot


subclass/superclass relationship? Mark for Review
(1) Points

A dog is a subclass of the cat superclass.

A rose is a subclass of the flower superclass. (*)

A computer is a subclass of a video game superclass.

A single person is a superclass of the human subclass.

[Correct] Correct

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


Mark for Review
(1) Points

(Choose all correct answers)

Run (*)

Act (*)
Speed (*)

Move

Turn

[Correct] Correct

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

True

False (*)

[Correct] Correct

29. From your Greenfoot lessons, which type of constructor can be


used to automate creation of Actor instances? Mark for Review
(1) Points

Animal

World (*)

Actor

Vector

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

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) Points

True
False (*)

[Correct] Correct

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) Points

Write the code.

Inspect the instances.

Review the documentation.

Compile the code. (*)

[Correct] Correct

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


something?

Mark for Review


(1) Points

3 (*)

[Correct] Correct
33. In Greenfoot, you may perform the programming tasks of create and
test many times. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

True

False (*)

[Correct] Correct

35. In Greenfoot, which method checks if a key on the keyboard has


been pressed? Mark for Review
(1) Points

keyPress method

keyUp method

keyDown method (*)

keyClick method

[Incorrect] Incorrect. Refer to Section 3 Lesson 7.

Section 3

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) Points
True (*)

False

[Correct] Correct

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) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

38. In Greenfoot, an if-statement is used to alternate between


displaying two images in an instance. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

39. In Greenfoot, a local variable is declared at the beginning of a


class. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

40. In Greenfoot, what is a common letter used for the loop variable?
Mark for Review
(1) Points
A

I (*)

[Correct] Correct

Section 3

41. In Greenfoot, which of the following statements could prevent an


infinite loop from occurring? Mark for Review
(1) Points

I = 100 + i

i=1

i = i

i = i + 1 (*)

[Correct] Correct

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) Points

True (*)

False

[Correct] Correct

43. To execute a method in your Greenfoot game, where is it called


from? Mark for Review
(1) Points
The world

The act method (*)

The actor class

The gallery

[Incorrect] Incorrect. Refer to Section 3 Lesson 6.

44. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

45. In the Greenfoot IDE, which of the following is not a property of


an instance? Mark for Review
(1) Points

Position

Inherited methods

Scenario name (*)

Defined methods

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.


Section 3

46. What does the following Greenfoot programming statement do?

turn(18); Mark for Review


(1) Points
Turn the object 36 degrees.

Turn the object 18 degrees. (*)

Turn the object 18 steps forward.

Move the object 18 steps forward.

[Correct] Correct

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


Mark for Review
(1) Points

orientTo( );

turnAround( );

move ( );

turn( ); (*)

[Correct] Correct

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) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 9.

49. Use your Greenfoot knowldege: Abstraction occurs in many


different ways in programming. True or false? Mark for Review
(1) Points

True (*)
False

[Correct] Correct

50. In Greenfoot, what happens if the condition is false in an if-


statement? Mark for Review
(1) Points

The programming statements are executed.

The if-statement is executed.

The act method is deleted.

The programming statements are not executed. (*)

[Correct] Correct

Section 2

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) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

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


cat backward, half the distance to the bird? Mark for Review
(1) Points

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} (*)

[Correct] Correct

3.

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

Mark for Review


(1) Points
True (*)
False

[Correct] Correct

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

True (*)

False

[Correct] Correct

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)

It makes the animation easier to run.

It makes the scene easier to view.

It simplifies code and makes it easier to read. (*)

It allows many objects of a class to use the same procedure. (*)


It can allow subclasses of a superclass to use a procedure. (*)

[Correct] Correct
Section 2

6. In Alice, procedural abstraction is the concept of making code


easier to understand and reuse. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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) Points

True (*)

False

[Correct] Correct

8. From your Alice lessons, variables are fixed and cannot be


changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

9. From your Alice lessons, what can be used as a guideline to


ensure your animation fulfills animation principles? Mark for Review
(1) Points

The Internet
Animation checklist (*)

A close friend

None of the above

[Correct] Correct

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

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 8.

Section 2

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


control structure? Mark for Review
(1) Points

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.

[Correct] Correct

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) Points

An instance
A method (*)

A class

A variable

[Incorrect] Incorrect. Refer to Section 2 Lesson 10.

13. A complete Alice instruction includes which of the following


components? Mark for Review
(1) Points

(Choose all correct answers)

Image

Class

Procedure (*)

Direction (*)

Amount (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

this.blueTang roll Left 1.0 (*)

this.blueTang Left 1.0

this.blueTang Left 1

this.blueTang roll Left 1


[Correct] Correct

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

True (*)

False

[Correct] Correct

Section 2

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


Mark for Review
(1) Points

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.

[Correct] Correct

17. From your Alice lessons, an instance's properties cannot be


modified. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

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
True

False (*)

[Correct] Correct

19. What Alice tool can be used to diagram the If conditional


execution statement? Mark for Review
(1) Points

Cause and effect diagram

Process flow diagram (*)

Conditional flow diagram

[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

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

True (*)

False

[Correct] Correct

Section 2

21. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
22. In Alice, which of the following arguments are available to
further refine an object's movements? Mark for Review
(1) Points

(Choose all correct answers)

Object

Distance (*)

Duration (*)

Delay

[Incorrect] Incorrect. Refer to Section 2 Lesson 5.

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

Above each set of programming statements. (*)

At the end of the program.

In the scene editor.

In their own procedure.

[Correct] Correct

24. In Alice, once procedures are added to a control statement, they


cannot be changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
25. In Alice, functions are dragged into the control statement, not
the procedure. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

Section 3

26. Which of the following demonstrates a Greenfoot


subclass/superclass relationship? Mark for Review
(1) Points

A dog is a subclass of the cat superclass.

A rose is a subclass of the flower superclass. (*)

A computer is a subclass of a video game superclass.

A single person is a superclass of the human subclass.

[Correct] Correct

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


Mark for Review
(1) Points

(Choose all correct answers)

Run (*)

Act (*)

Speed (*)

Move
Turn

[Correct] Correct

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

True

False (*)

[Correct] Correct

29. From your Greenfoot lessons, which type of constructor can be


used to automate creation of Actor instances? Mark for Review
(1) Points

Animal

World (*)

Actor

Vector

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

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) Points

True

False (*)

[Correct] Correct
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) Points

Write the code.

Inspect the instances.

Review the documentation.

Compile the code. (*)

[Correct] Correct

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


something?

Mark for Review


(1) Points

3 (*)

[Correct] Correct

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

False

[Correct] Correct

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

True

False (*)

[Correct] Correct

35. In Greenfoot, which method checks if a key on the keyboard has


been pressed? Mark for Review
(1) Points

keyPress method

keyUp method

keyDown method (*)

keyClick method

[Incorrect] Incorrect. Refer to Section 3 Lesson 7.

Section 3

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) Points

True (*)

False
[Correct] Correct

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) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

38. In Greenfoot, an if-statement is used to alternate between


displaying two images in an instance. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

39. In Greenfoot, a local variable is declared at the beginning of a


class. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

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

I (*)
X

[Correct] Correct

Section 3

41. In Greenfoot, which of the following statements could prevent an


infinite loop from occurring? Mark for Review
(1) Points

I = 100 + i

i=1

i = i

i = i + 1 (*)

[Correct] Correct

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) Points

True (*)

False

[Correct] Correct

43. To execute a method in your Greenfoot game, where is it called


from? Mark for Review
(1) Points

The world

The act method (*)


The actor class

The gallery

[Incorrect] Incorrect. Refer to Section 3 Lesson 6.

44. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

45. In the Greenfoot IDE, which of the following is not a property of


an instance? Mark for Review
(1) Points

Position

Inherited methods

Scenario name (*)

Defined methods

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.


Section 3

46. What does the following Greenfoot programming statement do?

turn(18); Mark for Review


(1) Points

Turn the object 36 degrees.

Turn the object 18 degrees. (*)


Turn the object 18 steps forward.

Move the object 18 steps forward.

[Correct] Correct

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


Mark for Review
(1) Points

orientTo( );

turnAround( );

move ( );

turn( ); (*)

[Correct] Correct

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) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 9.

49. Use your Greenfoot knowldege: Abstraction occurs in many


different ways in programming. True or false? Mark for Review
(1) Points

True (*)

False
[Correct] Correct

50. In Greenfoot, what happens if the condition is false in an if-


statement? Mark for Review
(1) Points

The programming statements are executed.

The if-statement is executed.

The act method is deleted.

The programming statements are not executed. (*)

[Correct] Correct

Section 2
(Answer all questions in this section)

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


Review
(1) Points

Slowing movements down.

Using math operators. (*)

Downloading the Alice 3 collision detector app.

Using object detection.

Correct Correct

2. Alice uses built-in math operators; they are: Mark for Review
(1) Points

Add and subtract

Multiply and divide

All of the above (*)


None of the above

Correct Correct

3. In Alice, functions are dragged into the control statement, not


the procedure. True or false? Mark for Review
(1) Points

True

False (*)

Correct Correct

4. Define the value of the variable LapCount based on the following


math calculation: LapCount + 10 = 15 Mark for Review
(1) Points

5 (*)

15

10

Correct Correct

5. Which of the following is not an Alice variable value type? Mark


for Review
(1) Points

Color

Decimal Number
Whole Number

Function (*)

Incorrect Incorrect. Refer to Section 2 Lesson 10.


6. From your Alice lessons, where on an object do an object's axes intersect?
Mark for Review
(1) Points

At the object's chest

At the object's head

At the object's center point (*)

At the object's bottom

Incorrect Incorrect. Refer to Section 2 Lesson 2.

7. A complete Alice instruction includes which of the following


components? Mark for Review
(1) Points

(Choose all correct answers)

Image

Class

Procedure (*)

Direction (*)

Amount (*)

Incorrect Incorrect. Refer to Section 2 Lesson 4.

8. The delay procedure in Alice halts an object's motion before the


next motion begins. True or false? Mark for Review
(1) Points
True (*)

False

Incorrect Incorrect. Refer to Section 2 Lesson 3.

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
(1) Points

True

False (*)

Correct Correct

10. 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? Mark for Review
(1) Points

True (*)

False

Correct Correct
11. In Alice, a computer program requires functions to tell it how to perform the
procedure. True or false? Mark for Review
(1) Points

True

False (*)

Incorrect Incorrect. Refer to Section 2 Lesson 6.

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


(1) Points
Are move statements

Are control statements (*)

Are complex statements

None of the above

Correct Correct

13. 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) Points

True (*)

False

Correct Correct

14. 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) Points

An instance

A method (*)

A class

A variable

Incorrect Incorrect. Refer to Section 2 Lesson 14.

15. Which of the following statements about methods is false? Mark


for Review
(1) Points

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

Methods whose return type is not void are required to include a return
statement specifying what to return.

The order in which methods are listed within the class is not important.

Java does not permit nesting one method definition within another method's
definition.

Incorrect Incorrect. Refer to Section 2 Lesson 14.


16. The following are examples of what in Java?
boolean
bite
char
short
int
long
float
double
Mark for Review
(1) Points

Types (*)

Expressions

Variables

Specifications

Incorrect Incorrect. Refer to Section 2 Lesson 13.

17. In Alice, where are arithmetic operators available? Mark for


Review
(1) Points

(Choose all correct answers)

Amount argument (*)

Size argument
Duration argument (*)

Get Distance functions (*)

If control

Incorrect Incorrect. Refer to Section 2 Lesson 13.

18. 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)

It makes the animation easier to run.

It makes the scene easier to view.

It simplifies code and makes it easier to read. (*)

It allows many objects of a class to use the same procedure. (*)

It can allow subclasses of a superclass to use a procedure. (*)

Incorrect Incorrect. Refer to Section 2 Lesson 5.

19. In Alice, which of the following is the most likely situation


where procedural abstraction could be used? Mark for Review
(1) Points

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.


Correct Correct

20. In Alice, when a new procedure is declared, all subclasses of the


superclass will inherit the procedure. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

21. From your Alice lessons, complete the following sentence: When coded,
an event triggers a ___________. Mark for Review
(1) Points

Infinite loop

Gallery

Procedure (*)

Scene

Correct Correct

22. From your Alice lessons, the IF control structure can process one
true and one false response. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

Section 3
(Answer all questions in this section)
23. From your Greenfoot lessons, a scenario is a game or simulation
implemented in Greenfoot. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

24. Which of the following are examples of a Greenfoot superclass?


Mark for Review
(1) Points

(Choose all correct answers)

Dog

Cat

Parrot

Actor (*)

World (*)

Correct Correct

25. From your Greenfoot lessons, how do you test that your code does
not contain bugs? Mark for Review
(1) Points

Write the code.

Inspect the instances.

Review the documentation.

Compile the code. (*)


Correct Correct

26. 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
(1) Points

True (*)

False

Correct Correct

27. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

Incorrect Incorrect. Refer to Section 3 Lesson 9.

28. In Greenfoot, which method checks if a key on the keyboard has


been pressed? Mark for Review
(1) Points

keyPress method

keyUp method

keyDown method (*)

keyClick method
Incorrect Incorrect. Refer to Section 3 Lesson 7.

29. In Greenfoot, when is a local variable most often used? Mark


for Review
(1) Points

Within the scenario

Within the act method

Within the world constructor

Within loop constructs (*)

Incorrect Incorrect. Refer to Section 3 Lesson 10.

30. From your Greenfoot lessons, which of the following logic


operators represents "and"? Mark for Review
(1) Points

&

&& (*)

Correct Correct

31. From your Greenfoot lessons, which symbol represents string concatenation?
Mark for Review
(1) Points

Symbol &

Symbol <

Symbol =
Symbol + (*)

Correct Correct

32. From your Greenfoot lessons, when do infinite loops occur? Mark
for Review
(1) Points

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.

Correct Correct

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

True

False (*)

Incorrect Incorrect. Refer to Section 3 Lesson 5.

34. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points

(Choose all correct answers)

Galleries

Classes (*)

Scenarios
Objects (*)

All of the above

Incorrect Incorrect. Refer to Section 3 Lesson 5.

35. In Greenfoot, you can use comparison operators to compare a


variable to a random number. True or false? Mark for Review
(1) Points

True (*)

False

Correct Correct

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

True

False (*)

Incorrect Incorrect. Refer to Section 3 Lesson 5.

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

True (*)

False

Correct Correct

38. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points

True

False (*)

Incorrect Incorrect. Refer to Section 3 Lesson 6.

39. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points

In the computer network

In the Greenfoot image gallery

In the Scene editor

In the documentation (*)

Incorrect Incorrect. Refer to Section 3 Lesson 2.

40. In Greenfoot, instances inherit the characteristics of the


subclass they belong to, but not the superclass. True or false? Mark for Review
(1) Points

True

False (*)

Correct Correct
41. In the Greenfoot IDE, which of the following are components of a parameter?
Mark for Review
(1) Points

(Choose all correct answers)

Parameter type (*)

Parameter return
Parameter name (*)

Parameter method

Parameter void

Correct Correct

42. From your Greenfoot lessons, to view the methods that a class
inherits, open the code editor and select documentation from the Tools menu. True
or false? Mark for Review
(1) Points

True (*)

False

Incorrect Incorrect. Refer to Section 3 Lesson 2.

43. Which class holds the method that ends a Greenfoot game? Mark
for Review
(1) Points

Greenfoot (*)

Class

GreenfootImage

Actor

Correct Correct

44. From your Greenfoot lessons, where should the stop method be
inserted into the source code? Mark for Review
(1) Points

In the defined method.


In the act method. (*)

In the import statement.

In the class header.

Incorrect Incorrect. Refer to Section 3 Lesson 8.

45. 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")); Mark for Review


(1) Points

setImage

GreenfootImage

duke100.png (*)

new

Incorrect Incorrect. Refer to Section 3 Lesson 8.

46. In Greenfoot, in which programming task are the objects identified? Mark
for Review
(1) Points

Define the problem.

Design the solution.

Program the solution. (*)

Test the solution.

Incorrect Incorrect. Refer to Section 3 Lesson 12.


47. In Greenfoot, dot notation is used to call a _____________ from
another class. Mark for Review
(1) Points

Method (*)

Class

Signature

Parameter

Correct Correct

48. From your Greenfoot lessons, which line of code is missing


something?

Mark for Review


(1) Points

3 (*)

Incorrect Incorrect. Refer to Section 3 Lesson 12.

49. From your Greenfoot lessons, in an if-statement, the programming


statements written in curly brackets are executed simultaneously. True or false?
Mark for Review
(1) Points

True

False (*)
Correct Correct

50. In Greenfoot, what happens if the condition is false in an if-


statement? Mark for Review
(1) Points

The programming statements are executed.

The if-statement is executed.

The act method is deleted.

The programming statements are not executed. (*)

Correct Correct

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. What Alice tool can be used to diagram the If conditional execution


statement?
Cause and effect diagram
Process flow diagram (*)
Conditional flow diagram

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

True False (*)

3. From your Alice lessons, the If control structure can process one true and
one false response. True or false
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?
True (*) False

5. Identify an example of an Alice expression.


"I feel happy."
If or Where
3x3=9 (*)
None of the above
6. In Alice, Do In Order and Do Together:
Are move statements
Are control statements (*)
Are complex statements
None of the above

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

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

9. Do In Order and Do Together are the only control statements available in


Alice. True or false?
True False (*)

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

Code
Project
Class (*)
Program

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

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

Object subclass
Biped class (*)
Quadruped class
Person subclass (*)

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

14. Define the value of the variable LapCount based on the following math
calculation: LapCount + 10 = 15
2
4
5 (*)
15
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?

True (*) 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.
Has a unique name.
Has a type associated with it.
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?
True (*) False

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


object?
Move
Turn
Roll
MoveToward
All of the above (*)

19. All objects in Alice have three dimensional coordinates on which axes?
(Choose all correct answers)
x (*)
y (*)
z (*)
w
All of the above

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

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. Each parameter is listed with its name first, then its data type. True
or false?
True False (*)

23. Which Alice execution task corresponds with the following storyboard
statement?
Cat turns to face mouse.

this.mouse turnToFace this.cat


mouse turnTo cat
this.cat turnToFace this.mouse (*)
cat TurnTo mouse

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


something?
talk
speak
say (*)
audible

25. From your Alice lessons, random numbers are set in the distance and
duration arguments in a procedure. True or false?
True (*) False
26. In Greenfoot, what type of parameter does the keyDown method expect?

String (*)
Boolean
Integer
Method

27. From your Greenfoot lessons, the keyDown method is located in which
class?
Actor
Greenfoot (*)
GreenfootImage
World

28. From your Greenfoot lessons, if the condition in an if-statement is


true, the first code segment is executed. True or false?
True (*) False

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

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

31. In Greenfoot, you must first create an instance before you create a class.
True or false?
True 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?
True False (*)

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

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?

True (*) False

35. 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
36. In Greenfoot, which of the following statements could prevent an infinite
loop from occurring?
I = 100 + i
i=1
i = i
i = i + 1 (*)

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


concatenation?

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");

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

&
&& (*)
=
!

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

40. 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. (*)

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

When source code is written.


When a new image is added to the class.
When a new instance of the class is created. (*)
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)

x (*)
z
y (*)
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?

True (*) False

44. From your Greenfoot lessons, which of the following comparison operators
represents "greater than"?
> (*)
<
= =
! =

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?

True False (*)

46. In the Greenfoot IDE, which of the following is not a property of an


instance?

Position
Inherited methods
Scenario name (*)
Defined methods

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

48. In the Greenfoot IDE, which of the following are components of a parameter?
(Choose all correct answers)

Parameter type (*)


Parameter return
Parameter name (*)
Parameter method
Parameter void

49. From your Greenfoot lessons, what is incorrect in this code example:
setLocation(getX(), (int) (altitude);

Spacing
Capitalization
Parenthesis (*)
Comma

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

Define the problem.


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

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


(1) Points

Are move statements


Are control statements (*)

Are complex statements

None of the above

[Correct] Correct

2. In Alice, the setVehicle procedure will associate one object to


another. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

3. 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) Points

True (*)

False

[Correct] Correct

4. Which of the following are examples of elements you would test in


your Alice animation? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 12.

5. From your Alice lessons, functional decomposition is the process


of taking a complex problem or process and growing it into larger parts that are
easier to manage. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

6. From your Alice lessons, what does the Count control statement
do? Mark for Review
(1) Points

Executes statements a random number of times.

Executes statements simultaneously.

Executes statements a specific number of times. (*)

Executes statements while a condition is true.

[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

7. 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
(1) Points

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}

[Correct] Correct

8. In Alice, we can avoid object collision using what? Mark for


Review
(1) Points

Slowing movements down.

Using math operators. (*)

Downloading the Alice 3 collision detector app.

Using object detection.

[Correct] Correct

9. Which of the following is not a valid arithmetic operator in


Java? Mark for Review
(1) Points

None of the above (*)

[Correct] Correct
10. A typical application uses various values and these values
continuously change while the program is running. True or false? Mark for
Review
(1) Points

True (*)

False

[Correct] Correct

11. In Alice, you can define your own procedures for a class, but not your own
functions. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

12. An Alice event is considered what? Mark for Review


(1) Points

A party with at least 20 people.

An object's orientation.

Error handling.

A keystroke or mouse click. (*)

[Correct] Correct

13. Alice objects move relative to the orientation of the person


viewing the animation. True or false? Mark for Review
(1) Points

True
False (*)

[Correct] Correct

14. Which of the following programming instructions commands the fish


to continuously move forward a random speed between 0.5 and 1.0 meters, minus 0.25
meters, until it collides with the shark? Mark for Review
(1) Points

(*)

[Correct] Correct

15. From your Alice lessons, variables are fixed and cannot be
changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

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

True (*)
False

[Correct] Correct

17. In Alice, objects inherit the characteristics of their: Mark


for Review
(1) Points

Code

Project

Class (*)

Program

[Correct] Correct

18. From your Alice lessons, a flowchart could be created in a


software program, or documented in a journal. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

19. Java programs can be simple programs that run from the command
line, or they can have complex graphical user interfaces. True or false? Mark
for Review
(1) Points

True (*)

False

[Correct] Correct
20. Each parameter is listed with its name first, then its data type.
True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

21. From your Alice lessons, which programming instruction represents the
following movement: A turtle moves forward half the distance to the flower. Mark
for Review
(1) Points

this.Turtle move Forward this.Turtle getDistanceTo this.Flower / 2.0 (*)

this.Turtle move Forward this.Turtle getDistanceTo this.Flower / 0.5

this.Turtle move Forward this.Turtle getDistanceTo this.Flower / 1.0

this.Turtle move Forward this.Turtle getDistanceTo this.Flower * 2

[Incorrect] Incorrect. Refer to Section 2 Lesson 7.

22. The Alice IF control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

Section 3
(Answer all questions in this section)

23. Using the Greenfoot IDE, which of the following programming


statements tells the object to turn 38 degrees? Mark for Review
(1) Points
move():

move(2);

turn(38); (*)

turn(38):

[Correct] Correct

24. From your Greenfoot lessons, a problem statement defines the


purpose for your game. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

25. From your Greenfoot lessons, which line of code is missing


something?

Mark for Review


(1) Points

3 (*)

[Correct] Correct
26. In Greenfoot, objects are created from: Mark for Review
(1) Points

Methods

Classes (*)

Signatures

Parameters

[Correct] Correct

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

Mark for Review


(1) Points

Method (*)

Constructor

Conditional

Class

[Correct] Correct

28. In Greenfoot, what happens if the condition is false in an if-


statement? Mark for Review
(1) Points

The programming statements are executed.

The if-statement is executed.

The act method is deleted.

The programming statements are not executed. (*)


[Correct] Correct

29. From your Greenfoot lessons, source code is written in the Code
editor. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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


operators represents "greater than"? Mark for Review
(1) Points

> (*)

<

= =

! =

[Correct] Correct

31. From your Greenfoot lessons, which axes define an object's position in a
world? Mark for Review
(1) Points

(Choose all correct answers)

x (*)

y (*)

w
[Correct] Correct

32. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points

(Choose all correct answers)

Galleries

Classes (*)

Scenarios

Objects (*)

All of the above

[Correct] Correct

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

True

False (*)

[Correct] Correct

34. In Greenfoot, instances inherit the characteristics of the


subclass they belong to, but not the superclass. True or false? Mark for Review
(1) Points

True

False (*)
[Correct] Correct

35. In the following Greenfoot method signature, which is the method


name?

void turnLeft() Mark for Review


(1) Points

()

void

turnLeft (*)

Left

[Correct] Correct

36. 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) Points

True (*)

False

[Correct] Correct

37. From your Greenfoot lessons, which of the following is an example


of a type of data passed through a parameter? Mark for Review
(1) Points

Methods

Classes

Integers (*)

Scenarios
[Correct] Correct

38. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points

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.

[Correct] Correct

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

True (*)

False

[Correct] Correct

40. From your Greenfoot lessons, an instance inherits all of the


characteristics of the class, and those characteristics cannot be changed. True or
false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

41. In Greenfoot, which of the following are execution controls? Mark for
Review
(1) Points

(Choose all correct answers)

Run (*)

Act (*)

Speed (*)

Move

Turn

[Correct] Correct

42. 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) Points

True

False (*)

[Correct] Correct

43. Greenfoot Actor instances get their images from which of the
following? Mark for Review
(1) Points

Their class (*)

Their source code

Their image editor

Their methods
[Correct] Correct

44. In Greenfoot, which method is used to add a new instance to a


scenario when the world is initialized? Mark for Review
(1) Points

addClass

addWorld

addObject (*)

addInstance

[Correct] Correct

45. In Greenfoot, what type of parameter does the keyDown method


expect? Mark for Review
(1) Points

String (*)

Boolean

Integer

Method

[Correct] Correct

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

True

False (*)

[Correct] Correct
47. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points

A statement that executes one segment of code.

A statement that can execute a section of code multiple times. (*)

A statement that can execute a section of code one time.

A statement that can execute a method multiple times.

[Correct] Correct

48. In Greenfoot, what is a common letter used for the loop variable?
Mark for Review
(1) Points

I (*)

[Correct] Correct

49. From your Greenfoot lessons, which of the following logic


operators represents "and"? Mark for Review
(1) Points

&

&& (*)

!
[Correct] Correct

50. 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? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

Test: Get Started with Alice 3: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. What do moving objects provide to your scene? Mark for Review


(1) Points

The sky and ground

The action (*)

The procedures

The non-moving scenery

[Correct] Correct

2. In Alice, where are objects added and positioned in the scene?


Mark for Review
(1) Points

The Code editor

The gallery

The Scene editor (*)


The template

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

3. Which button is selected in the Alice file menu to save a version


of an animation? Mark for Review
(1) Points

File

New

Save As... (*)

Open

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

4. Alice 3 will periodically remind you to save your project. True


or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

5. In Alice, once an instance is added to the scene, it cannot be


deleted. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
6. When is an instance created in Alice? Mark for Review
(1) Points

After the code is created.

After the scenario is saved.

After the folder is selected in the gallery.

After the class icon is dragged into the scene. (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

7. Creating multiple versions of your Alice project saves time. True


or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

8. After objects are positioned in the scene, it is wise to save


multiple versions of the project, giving each version the same name. True or false?
Mark for Review
(1) Points

True

False (*)

[Correct] Correct

9. How do you create a programming instruction in Alice? Mark


for Review
(1) Points

Click and drag the desired programming instruction into the Procedures tab.
Click and drag the desired programming instruction into the myFirstMethod
tab. (*)

Click and drag the desired programming instruction into the Scene editor.

Click and drag the desired programming instruction into the Functions tab.

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

10. How do you view the results of procedures entered in the Alice
code editor? Mark for Review
(1) Points

Select the Play button.

Select the Run button. (*)

View the procedures in the gallery.

Save the scene.

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

11. Copying programming instructions saves time when programming your


Alice project. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

12. Which option copies a programming instruction to the clipboard?


Mark for Review
(1) Points

Clipboard

Is Enabled
Copy to Clipboard (*)

Paste

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

13. When something is broken or doesn't work as intended in a


software program, it is referred to as a _________? Mark for Review
(1) Points

Bug (*)

Debug

Error

Code

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

14. Debugging is the process of finding bugs in a software program.


True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

Page 1 of 1

Test: Add and Position Objects: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. Saved Alice projects can be opened and edited. True or false?


Mark for Review
(1) Points

True (*)

False

[Correct] Correct

2. Which of the following are ways to open an existing Alice project


file after launching Alice? Mark for Review
(1) Points

(Choose all correct answers)

Click and drag the file from your computer into Alice 3.

Select the project from the My Projects tab. (*)

Browse for the project using the File System tab. (*)

Double-click on the project file name in the folder it is stored in on your


computer.

[Correct] Correct

3. In Alice, where are objects added and positioned in the scene?


Mark for Review
(1) Points

The Code editor

The gallery

The Scene editor (*)

The template

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

4. In Alice, there is a limit of 10 objects per scene. True or


false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

5. In Alice, what does the resize handle style do? Mark for
Review
(1) Points

Simple rotation and movement

Rotate about the x, y, and z axes

Change size of the object and stretch it along the x, y, and z axes (*)

Move along the x, y, and z axes

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

6. Manually manipulating an Alice object with your cursor is a way


to precisely position an object. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

7. Which of the following is not an example of a one-shot procedure?


Mark for Review
(1) Points

Roll

Move
Turn

Spin (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

8. Only acting objects have one-shot procedures. True or false?


Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

9. When you edit an object's properties in the Scene editor, the


changes do not take effect until the Run button is clicked. True or false? Mark
for Review
(1) Points

True

False (*)

[Correct] Correct

10. One type of object property is an object's position in the scene.


True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

11. Which of the following is not one of the positioning axes used in
Alice 3? Mark for Review
(1) Points

w (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

12. In Alice, where does an instance's axes intersect? Mark for


Review
(1) Points

At the instance's head.

At the instance's feet.

At the instance's center point. (*)

At the world's center point.

[Correct] Correct

13. Which handle style would be used to rotate an object's sub-part


about the x, y, and z axes? Mark for Review
(1) Points

Rotation (*)

Default

Translation

Resize
[Correct] Correct

14. Rings will appear around a sub-part indicating how you can
reposition it. True or false? Mark for Review
(1) Points

True (*)

Test: Use Procedures and Arguments: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. To access the Alice Code editor from the Scene editor, which
button do you click? Mark for Review
(1) Points

Access Code Editor

Code Editor

Edit Code (*)

Code

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

2. The Alice Scene editor contains tools to rotate the camera view.
True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

3. In Alice the Functions tab will display the pre-defined functions


for the selected instance. True or false? Mark for Review
(1) Points

True (*)
False

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

4. The Procedures tab and the Functions tab are the two tabs
available in the Alice methods panel. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

5. Which of the following instructions turns the clown fish left 5


meters? Mark for Review
(1) Points

this.clownFish turn Left 5.0 (*)

this.clownFish turn Left 0.5

this.clownFish turn Left 5

this.Fish turn Left 5

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

6. Which of the following procedures turns an object to face another


object? Mark for Review
(1) Points

turn

turnToFace (*)

orientToUpright
moveToward

[Correct] Correct

7. Which of the following is the default control statement in


myFirstMethod? Mark for Review
(1) Points

Count

Do Together

Do In Order (*)

Comment

[Correct] Correct

8. To add a procedure to myFirstMethod, right-click on the procedure


you wish to add and select the Add button. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

9. The Alice move procedure contains which arguments? Mark for


Review
(1) Points

(Choose all correct answers)

Object

Direction (*)

Amount (*)
Text

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

10. An argument is a value that the procedure uses to complete its


task. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

11. Programming comments do not affect the functionality of your


Alice animation. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

12. What is the first step to entering comments in an Alice program?


Mark for Review
(1) Points

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.

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

13. Which of the following ways can you alter a procedure in Alice?
Mark for Review
(1) Points

(Choose all correct answers)

Copy (*)

Count

Disable (*)

Reorder (*)

[Correct] Correct

14. When you disable a programming instruction, it is still executed


when you run the Alice animation. True or false? Mark for Review
(1) Points

True

False (*)
selection 2 using alice 3
add rotation and randomization quis
1.Which Alice control statement executes a set of procedures simultaneously?
B. Do together (*)
2.Which Alice execution task corresponds with the following storyboard statement?
Cat rolls to the left
. this.Cat roll Left 1.0 (*)
3. In Alice, control statements are dragged into the Code editor. True or false?
true (*)
4. In Alice, the while control statement executes a set of procedures a specific
number of times. True or false?
False (*)
5. In Alice, the computer specifies the low and high range values for the range of
numbers from which to pull a randomized number. True or false?
False(*)
6. In Alice, which of the following arguments could be replaced with a random
number?
Distance (*)
Duration (*)
@ DECLARE PROCEDURE QUIS
1.In Alice, what are the forms of a scenario?
A problem to solve. (*)
A task to perform. (*)
2. An animation gives the scenario a purpose. True or false?
False(*)
3. Breaking down a problem or process into smaller parts makes it easier to manage.
True or false?
True(*)
4. A textual storyboard helps the reader understand the actions that will take
place during the animation. True or false?
True(*)
5. Which Alice tool is used to demonstrate the process flow of an animation?
Flowchart(*)

6.A flowchart is a useful way to illustrate how your Alice animation's characters
will look. True or false?
False(*)
7. From your Alice lessons, what does inheritance mean?
Each subclass inherits the methods and properties of its superclass. (*)
8. Which of the following would a clown fish object in Alice inherit from its
class?
Fins,Two eyes, Procedure,funcitions ALL OF THE ABOVE (*)
9. Procedural abstraction may need to be implemented if an object in Alice needs to
perform an action, but there isn't an inherited procedure that accomplishes that
action. True or false?
True(*)
10. Which of the following is a reason why procedural abstraction may be used in
programming an animation?
The code is too long. (*)
The code is difficult to read. (*)
The programmer wants to reuse the code. (*)
11. In Alice, new procedures are declared in the Scene editor. True or false?
False(*)
12. In Alice, you could identify when new procedures need to be declared by
reviewing the textual storyboard for the animation. True or false?
True(*)
13. In Alice, which of the following situations could benefit from declaring a new
procedure?
An object does not have a default procedure for a motion, such as swimming.
(*)
Multiple objects need to use a motion, such as bunnies hopping. (*)
A single motion, such as walking, takes up a lot of room in myFirstMethod.
(*)
14. In Alice, if only objects that walk on four legs need to use a procedure, in
which superclass would the procedure be declared?
Quadruped(*)
@USE CONTROL STATEMENT QUIS
1.In Alice, which of the following is not a control statement?
Move(*)
2. In Alice, which control statement is used to invoke simultaneous movement?
Do Together(*)
3. In Alice, a walking motion for a bipedal object can be achieved without the Do
Together control statement. True or false?
False(*)
4. In Alice, different programming is not required for different objects, because
all objects move the same way. True or false?
False(*)
5. In Alice, when two objects are synchronized and move together, this means that
one object is
A vehicle of another (*)
6. In Alice, which procedure is used to assign one object as the vehicle of
another?
setVehicle(*)
@USE FUNCITIONS QUIS
1.In Alice, where can you view the list of functions available for an object?
Functions tab in the methods panel. (*)
2. In Alice, functions ask questions about an object. True or false?
False(*)
@ USE THE IF AND WHILE CONTROL SCTRUCTURES QUIS
1.In Alice, the If control structure can process one true and one false response.
True or false?
True(*)
2. The Alice If control structure requires the false statement to be populated.
True or false?
False(*)
3. A conditional loop is a loop that will continue forever. True or false?
False(*)
4. In Alice, we use the While control statement to implement the conditional loop.
True or false?
True(*)
@ USE EXPRESSIONS QUIS
1.An example of an expression is
3x3=9 (*)
2. Alice uses built-in math operators. They are
Add,subtract,multiply,Devide.ALL OF THE ABOVE(*)
3. 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} (*)
4. In Alice, which of the following programming statements moves the cat forward
the distance to the bird
This.Cat move forward {this.Cat getDistanceTo this.Bird} (*)
@ USE VARIABLES QUIS
1.Which is an example of the Boolean variable type?
True or False (*)
2. The initializer of a variable with a TextString value type could be (select all
that apply)
"Greetings" (*)
"Howdy" (*)
"4" (*)
@ USE KEYBOARD CONTROL QUIS
1.With keyboard controls, you can create Alice animations where the user controls
an object that interacts with other objects. True or false?
True(*)
2. Event listeners look for and resopnd to the interactivity of the computer. True
or false?
False(*)
@ DEVELOP A COMPLETE ANIMATION QUIS
1.As the Alice programmer, you render the animation on your own. True or false?
False(*)
2. In Alice, what are the forms of a scenario?
A problem to solve. (*)
A task to perform. (*)
3. What can be used as a guideline to ensure your Alice animation fulsfills
animation principles?
An animation checklist (*)
4. The animation checklist helps you confirm that all elements of the Alice
animation are operating as expected. True or false?
True(*)
5. Which of the following elements of the Alice animation should be tested before
the animation is considered complete?
Math calculations operate as expected.
Objects move with smooth timing.
Comments are added to each sequence of instructions
Control statements are operating as expected
All of the above. (*)
6. The Alice animation should be tested throughout development, not just at the end
of the animation's development. True or false?
True(*)
7. What type of Alice listener object is required to target a mouse-click on any
object in the scene, allowing the user to drag that object around the scene when
the animation is running?
addDefaultModelManipulation procedure (*)
8. In which Alice class is the addDefaultModelManipulation procedure located?
Scene class (*)
9. When presenting your Alice animation, ensure that your presentation is
thoroughly tested and complete. True or false?
True(*)
10. When presenting your Alice animation, it is not important to give the audience
a reason to listen to the presentation. True or false?
False(*)
@ CORRELATING JAVA VARIABLES,DATA TYPES AND EXPRESSSION WIH ALICE 3 QUIS
1.The list below describes variables. All are correct except which one?
Arranged In Rows and Columns(*)
2.

Examine the following code. What are the variables?


Args,n,i,t,All of the above are variables(*)
3. The following are examples of what in Java?
boolean
byte
char
short
int
long
float
double
Types(*)
4. The list below displays valid primitive types in Java, except which one?
String(*)
5. The list below displays valid arithmetic operators in Java, except which one?
% (*)
6. Results of arithmetic operations cannot be stored in a variable. True or false?
False(*)
7. Expressions with relational operators produce true and false values. True or
false? True(*)
8.What is the result of the following code?

x > y : true
x < y : false (*)
9. 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 or false?
True(*)
10. What is the output produced by the following code?

J is 5
k is 5 (*)
@ CORRELATING JAVA METHODS, CLASSES AND OTHER STRUCTURES WITH
ALICE 3 TOOLS QUIS
1.The list below contains method descriptions. All are correct except which one?
A subprogram that acts on data and often returns a value. (*)
A set of code that is referred to by name. (*)
2. Main is an example of what in the following code?
public static void main (String[] args) {
System.out.println{"Hello World!");
}
A method(*)
3. You have a Class representing Cat. A cat can meow, purr, catch mice, and so on.
When you create a new cat, what is it called?
An Instance(*)
4. You want a block of code to be executed only once if certain conditions are met.
What type of Java construct would you use?
If(*)
5. 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?
If(*)
6. If you need to repeat a group of Java statements many times, which Java
construct should you use?
Do while loop (*)
While loop(*)
7. Review the code below.

Select the result from the following statements about what happens when the loopVal
>= 5 .
The condition loopVal < 5 is tested before executing anything further in the
program.(*)
8. Which of the following statements about methods is false?
Classes must be defined directly within a method definition. (*)
9. In Java, a function is a method that must return a value. True or false?
False(*)

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

Print "A", "B" and the value of num3 on the screen. (*)
11. Consider the following: You want to use the BufferedReader and
InputStreamReader classes to get user input from the command line. Which one of the
following import statements must you use?
import java.io.*; (*)

Test: Getting Started with Greenfoot: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. In Greenfoot, what happens to an instance when the Act button is


clicked in the environment? Mark for Review
(1) Points

Only one instance moves until the pause button is clicked.

The instance executes all of the programming statements in their class's act
method once. (*)

The instance executes all of the programming statements in their class's act
method repeatedly until the scenario is stopped.

The instance executes all of the programming statements in their class's act
method two times until the scenario is stopped.

The class executes all of the programming statements in their instance's act
method two times until the scenario is stopped.

[Incorrect] Incorrect. Refer to Section 3 Lesson 1.

2. In Greenfoot, the Run button repeatedly executes all of the


programming statements in the class's act method in sequential order until the
pause button is clicked. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 1.

3. An object is an instance of a class. True or false? Mark for


Review
(1) Points

True (*)

False

[Correct] Correct

4. In Greenfoot, the class holds the general attributes of an


instance, such as the methods it inherits. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct
5. A subclass has what kind of relationship to a superclass? Mark
for Review
(1) Points

"for-what"

"a-is"

"is-a" (*)

"is-by"

[Incorrect] Incorrect. Refer to Section 3 Lesson 1.

6. What does an instance of the World class do? Mark for Review
(1) Points

Provide the acting objects for the scenario.

Provide the background scenery for the scenario. (*)

Provide the superclass for acting objects.

Provide the source code for instances.

[Correct] Correct

7. In Greenfoot, after a subclass is created, what has to occur


before instances can be added to the scenario? Mark for Review
(1) Points

Creation of an instance

Compilation (*)

Creation of source code

Editing of source code


[Correct] Correct

8. In Greenfoot, after a subclass is created and compiled, you


cannot edit the subclass's source code. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 1.

Test: Using Methods, Variables and Parameters: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. In Greenfoot, the move method expects what type of information in


its parameters? Mark for Review
(1) Points

Degrees to turn

True or false response

String statement

Integer of steps to move forward (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

2. In Greenfoot, the turn method expects what type of information in


its parameters? Mark for Review
(1) Points

Degrees to turn (*)

True or false response


String statement

Integer of steps to move forward

Parameter void

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

3. Using the Greenfoot IDE, only five instances can be added to a


scenario. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

4. In Greenfoot, the instance has a source code editor. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

5. In the Greenfoot IDE, an instance's position is on the x and y


coordinates. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

6. In Greenfoot, which of the following options are not possible


when associating an image file with an instance? Mark for Review
(1) Points

Add a video (*)

Draw an image

Import an image

Select an image from the Greenfoot library

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

7. An instance variable can be saved and accessed later, even if the


instance no longer exists. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

8. A variable is also known as a ____________. Mark for Review


(1) Points

Instance

Class

Field (*)

Syntax

Method

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

9. In Greenfoot, the body of the method is located in between which


of the following characters? Mark for Review
(1) Points

Parnetheses ( )

Curly brackets { } (*)

Square brackets [ ]

Asterisks **

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

10. In Greenfoot, methods can be called in the act method. When the
Act button is clicked in the environment, the methods in the method body of the act
method are executed. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

Page 1 of 1

Test: Working with Source Code and Documentation: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. The list below provides actions you can perform in the Greenfoot
code editor except one. Which one should be removed? Mark for Review
(1) Points

Write source code to tell the class how to act in the scenario.

Review the online Java Library documentation. (*)

Write and edit source code.


Write and edit comments.

[Correct] Correct

2. The list below displays components of the Greenfoot source code


editor except one. Which one should be removed? Mark for Review
(1) Points

Documentation

Comments

Method body

Instance creator (*)

Class description

[Incorrect] Incorrect. Refer to Section 3 Lesson 3.

3. In a Greenfoot if-statement, the programming statements that the


if-statement executes are written in curly brackets. True or false? Mark for
Review
(1) Points

True (*)

False

[Correct] Correct

4. An if-statement requires which type of information returned from


the condition? Mark for Review
(1) Points

Integer

Action

True or false (*)


Method

[Incorrect] Incorrect. Refer to Section 3 Lesson 3.

5. In Greenfoot, which of the following methods display an object's


orientation? Mark for Review
(1) Points

(Choose all correct answers)

void move()

int getRotation() (*)

int getX() (*)

void turn()

[Incorrect] Incorrect. Refer to Section 3 Lesson 3.

6. In Greenfoot, which of the following methods return the world


that the instance lives in? Mark for Review
(1) Points

World getClass()

World getWorld() (*)

getRotation()

getXY()

[Correct] Correct

Page 1 of 1

Test: Developing and Testing an Application: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. Which of the following is an incorrectly written programming


statement? Mark for Review
(1) Points

move(): (*)

move(2);

turn(25);

turn(2);

[Correct] Correct

2. Which of the following features of Greenfoot will teach you how


to identify bugs in your program? Mark for Review
(1) Points

Code editor

Compilation (*)

Instance creation

Documentation

[Correct] Correct

3. In object oriented programming, programmers analyze a problem and


create objects to solve the problem. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 4.


4. From your Greenfoot lessons, Which of the following statements is
most correct? Mark for Review
(1) Points

My program is complete when it compiles.

My program is complete when I add music to it.

My program is complete when it runs and I've tested the code. (*)

My program is complete when I add images to it.

[Correct] Correct

Page 1 of 1

Test: Using Randomization and Understanding Dot Notation and Constructors: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. Which of the following Greenfoot methods returns a random number


between 0, up to and including 10,000? Mark for Review
(1) Points

Greenfoot.getRandomNumber(10,000)

Greenfoot.getRandomNumber(10,001) (*)

Greenfoot.getRandomNumber(9,999)

Greenfoot.getRandomNumber(0-10,000)

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

2. What does the following Greenfoot programming statement tell the


class to do?
if (Greenfoot.getRandomNumber(100) < 6) { turn(18); } Mark for Review
(1) Points

If a random number is returned that is greater than 6, turn 18 degrees.


If a random number is returned that is less than 6, move 18 steps.

If a random number is returned that is less than 6, turn 18 degrees. (*)

Turn 6 degrees, then turn 18 degrees.

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

3. Which of the following comparison operators represents "greater


than or equal"? Mark for Review
(1) Points

>

>= (*)

= =

! =

[Correct] Correct

4. In Greenfoot you can use comparison operators to compare a


variable to a random number. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

5. An if-else statement executes its first code block if a condition


is true, and its second code block if a condition is false, but not both. True or
false? Mark for Review
(1) Points

True (*)
False

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

6. The first step to executing an if-else statement is


to:____________. Mark for Review
(1) Points

Execute the if statement

Execute the else statement

Evaluate the class

Evaluate the condition (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

7. The list below displays characteristics of a Greenfoot world


constructor, except for one. Which one should be removed? Mark for Review
(1) Points

Defines the instance's size and resolution.

Has a void return type. (*)

Has no return type.

Has the same name as the name of the class.

Executed automatically when a new instance of the class is created.

[Correct] Correct

8. In Greenfoot, which keyword calls the World superclass? Mark


for Review
(1) Points

world
constructor

super (*)

addObject

new

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

9. In Greenfoot, which of the following is the correct notation for


calling a method for an instance of a class? Mark for Review
(1) Points

object-name.method-name(parameters); (*)

class-name.method-name(parameters);

Method-name.object-name(parameters);

Method-name.object-name;

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

10. In Greenfoot, a semicolon is not necessary at the end of a method


that uses dot notation. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

11. In Greenfoot, the origin of the world coordinate system (0,0)


starts in the center of the world. True or false? Mark for Review
(1) Points
True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

12. Which keyword indicates that Greenfoot needs to create a new


object? Mark for Review
(1) Points

new (*)

addObject

newObject

newClass

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

Page 1 of 1

Test: Defining Methods: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. In the Greenfoot IDE, any new methods you create are written in
the class's source code, below the act method. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

2. In reference to Greenfoot, if the following method was defined in


a superclass,

public void lookForEdge(){


...
}
all subclasses of the superclass will inherit the method.
True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 6.

Page 1 of 1

Test: Using Sound and Keyboard Control: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. In Greenfoot, the sound file must be saved in the scenario and


written in the source code for it to play. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 7.

2. You cannot record unique sounds in Greenfoot. You can only use
the sounds that are stored in the Greenfoot library. True or false? Mark for
Review
(1) Points

True

False (*)

[Correct] Correct

3. What type of parameter does the keyDown method expect? Mark


for Review
(1) Points

The password that will protect the class.

The name of the key to press on the keyboard. (*)

The name of the class that will use the key.

The name of the sound file to play when the key is pressed.

[Correct] Correct

Page 1 of 1

Test: Creating a World, Animating Actors, and Ending a Game: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. In Greenfoot, which method body correctly adds an instance of the


World to a scenario, with size x = 300 y = 300 and a resolution of 2 pixels per
cell? Mark for Review
(1) Points

world(300, 300, 2);

Super(300,300,2);

super(2,300,300);

super(300,300,2); (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

2. A constructor is executed once in the course of a Greenfoot


scenario. True or false? Mark for Review
(1) Points

True

False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

3. Which of the following Greenfoot programming statements creates a


new instance of Duke, and places him at x = 140, y = 130 in the world? Mark
for Review
(1) Points

addObject(new( ), 140, 130);

addObject(new Duke( ), 140, 130); (*)

new(addObject(Duke ), 140, 130);

new(Duke( ) 140, 130);

[Correct] Correct

4. Which keyword is used to add an actor to a Greenfoot world?


Mark for Review
(1) Points

addObject

add

new (*)

super

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

5. Which of the following is the correct syntax for declaring a


variable in Greenfoot? Mark for Review
(1) Points

(Choose all correct answers)

public variable-type variable-name; (*)


private variable-name, variable-type;

public variable-name variable type;

private variable-type variable-name; (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

6. In Greenfoot, what is the purpose of the variable type? Mark


for Review
(1) Points

Defines the access specifier used with the variable.

Defines what kind of data to store in the variable. (*)

Defines which class the variable is associated with.

Defines the instance that the variable is associated with.

[Correct] Correct

7. Which operator is used to test if values are equal? Mark for


Review
(1) Points

<

== (*)

>

!>

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

8. In Greenfoot, the == operator is used to test if two values are


equal. True or false? Mark for Review
(1) Points
True (*)

False

[Correct] Correct

9. The GreenfootImage class enables Greenfoot actors to maintain


their visible image by holding an object of type GreenfootImage. True or false?
Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

10. What does the following programming statement mean?

image1 = new GreenfootImage("duke12.png?); Mark for Review


(1) Points

The variable, image1, cannot use the image file, duke12.png.

The image file, duke12.png, has just been drawn and imported into the
scenario.

The image file, duke12.png, is assigned to the variable image1. (*)

Image files from 1-119 are associated with image1.

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

11. In Greenfoot, which method is used to end a game? Mark for


Review
(1) Points

Class.stop( );

Greenfoot.stop( ); (*)
Duke.stop( );

Game.stop(1);

[Correct] Correct

12. Where can we review the available classes and methods in


Greenfoot, including the stop method? Mark for Review
(1) Points

Class menu

Object menu

Class Application Programmers' Interface (API)

Greenfoot Application Programmers' Interface (API) (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

Page 1 of 1

Test: Understanding Abstraction: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. From your Greenfoot lessons, which of the following are examples


of when abstraction techniques are used? Mark for Review
(1) Points

Assigning a sound file to an instance.

Assigning a keyboard key to an instance.

Assigning an image file to an instance.

All of the above. (*)


[Correct] Correct

2. Abstraction occurs in many different ways in programming. True or


false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

Page 1 of 1

Test: Using Loops, Variables, and Strings: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. From your Greenfoot lessons, which of the following are examples


of actions that can be achieved using the while loop? Mark for Review
(1) Points

Create 50 instances of the Duke class.

Call the move method 1 million times.

Call the move and turn methods 10 times.

Create 100 instances of an Actor subclass.

All of the above. (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

2. Which of the following is not a component of a while loop? Mark


for Review
(1) Points

Local variable
Control operator

Loop variable

if statement (*)

while keyword

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

3. If an end to a while loop is not established, what happens?


Mark for Review
(1) Points

The code stops after 10 executions.

The code stops after 20 executions.

The condition becomes false after one minute of executions.

The code executes and does not stop. (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

4. Infinite loops are a common cause of errors in programming. True


or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

5. An array is an object that holds multiple methods. True or false?


Mark for Review
(1) Points

True
False (*)

[Correct] Correct

6. In Greenfoot, arrays are a way to hold and access multiple


variables, and assign different values to new instances each time the while loop
executes and produces a new instance. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

7. Which of the following Greenfoot logic operators represents


"not"? Mark for Review
(1) Points

&

&&

! (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

8. In the Greenfoot IDE, what does the AND operator (&&) do? Mark
for Review
(1) Points

Compares two boolean values, and returns a boolean value which is true if and
only if both of its operands are true. (*)

Compares two boolean values, and returns a boolean value which is true if and
only if one of its operands are true.
Compares two boolean values and returns a boolean value which is true if
either one of the operands is true.

Compares two boolean variables or expressions and returns a result that is


true if either of its operands are true.

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

9. In Greenfoot, a local variable is declared at the beginning of a


class. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

10. In Greenfoot, what types of values cannot be stored in a local


variable? Mark for Review
(1) Points

Class name

Objects

Integers

World name

Method (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

11. In Greenfoot, string concatenation reduces the number of


redundant characters or phrases you need to type into each array. True or false?
Mark for Review
(1) Points

True (*)
False

[Correct] Correct

12. Which of the following is an example of string concatenation?


Mark for Review
(1) Points

Instead of entering ".png" after each image file name, add && ".png" after
the imageName value in the programming statement.

Instead of entering ".png" after each image file name, add = ".png" after the
imageName value in the programming statement.

Instead of entering ".png" after each image file name, add + ".png" after the
imageName value in the programming statement. (*)

Instead of entering ".png" after each image file name, add ".png" after the
imageName value in the programming statement.

[Correct] Correct

Page 1 of 1

Test: Creating an Inventory of Java Fundamentals: Quiz

Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)

1. From your Greenfoot lessons, the __________ control structure is


used to compare and make a decision. Mark for Review
(1) Points

Conditional (*)

Repetition

Obsolete

Rewind
[Correct] Correct

2. From your Greenfoot lessons, the __________ control structure is


often referred to as loops. Mark for Review
(1) Points

Conditional

Repetition (*)

Obsolete

Rewind

[Correct] Correct

3. The construct listed below is described as a __________________.

/**
* Get value and store in variable
*/

Mark for Review


(1) Points

Method

Comment (*)

Variable Assignment

Instruction

[Incorrect] Incorrect. Refer to Section 3 Lesson 12.

4. The construct listed below is described as a __________________.

termvar = scanterm.nextLine();
Mark for Review
(1) Points

Method
Comment

Variable Assignment (*)

Instruction

[Correct] Correct

5. What is wrong with the following line of code?

System.out.println(termvar + '; '+ termdef);


Mark for Review
(1) Points

There are parenthesis instead of brackets.

There are parenthesis instead of curly braces.

There are single quotes instead of double quotes. (*)

The command is incorrectly capitalized.

Nothing is wrong with the code.

[Incorrect] Incorrect. Refer to Section 3 Lesson 12.

6. Which line of code contains a syntax error?

Mark for Review


(1) Points

3 (*)

5
6

[Incorrect] Incorrect. Refer to Section 3 Lesson 12.

7. In which step to create a Greenfoot game do you find and resolve


errors in the game? Mark for Review
(1) Points

Define the problem

Design the solution

Program the solution

Test the solution (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 12.

8. In which step to create a Greenfoot game is the solution


implemented? Mark for Review
(1) Points

Define the problem

Design the solution

Program the solution (*)

Test the solution

[Incorrect] Incorrect. Refer to Section 3 Lesson 12.

9. From your Greenfoot lessons, which of the following are examples


of Q/A test variations? Mark for Review
(1) Points

Change the environment, change the programmer, change the execution

Change the execution, change the data, change the environment (*)
Change the environment, change the execution, change the language

All of the above.

[Correct] Correct

10. The variations listed below are examples of changing what part of
Q/A testing?

Input numbers when characters are expected


Input characters when numbers are expected
Input symbols

Mark for Review


(1) Points

Change the environment

Change the execution

Change the data (*)

None of the above

[Incorrect] Incorrect. Refer to Section 3 Lesson 12.

Page 1 of 1

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


statement?
Cause and effect diagram
Process flow diagram (*)
Conditional flow diagram

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

True False (*)

3. From your Alice lessons, the If control structure can process one true and
one false response. True or false
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?
True (*) False

5. Identify an example of an Alice expression.


"I feel happy."
If or Where
3x3=9 (*)
None of the above

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


Are move statements
Are control statements (*)
Are complex statements
None of the above

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

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

9. Do In Order and Do Together are the only control statements available in


Alice. True or false?
True False (*)

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

Code
Project
Class (*)
Program

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

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

Object subclass
Biped class (*)
Quadruped class
Person subclass (*)

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

14. Define the value of the variable LapCount based on the following math
calculation: LapCount + 10 = 15
2
4
5 (*)
15
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?

True (*) 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.
Has a unique name.
Has a type associated with it.
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?
True (*) False

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


object?
Move
Turn
Roll
MoveToward
All of the above (*)

19. All objects in Alice have three dimensional coordinates on which axes?
(Choose all correct answers)
x (*)
y (*)
z (*)
w
All of the above

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

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. Each parameter is listed with its name first, then its data type. True
or false?
True False (*)

23. Which Alice execution task corresponds with the following storyboard
statement?
Cat turns to face mouse.

this.mouse turnToFace this.cat


mouse turnTo cat
this.cat turnToFace this.mouse (*)
cat TurnTo mouse

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


something?
talk
speak
say (*)
audible

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

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

String (*)
Boolean
Integer
Method

27. From your Greenfoot lessons, the keyDown method is located in which
class?
Actor
Greenfoot (*)
GreenfootImage
World

28. From your Greenfoot lessons, if the condition in an if-statement is


true, the first code segment is executed. True or false?
True (*) False

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

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

31. In Greenfoot, you must first create an instance before you create a class.
True or false?
True 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?
True False (*)

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

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?

True (*) False


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

36. In Greenfoot, which of the following statements could prevent an infinite


loop from occurring?
I = 100 + i
i=1
i = i
i = i + 1 (*)

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


concatenation?

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");

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

&
&& (*)
=
!

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

40. 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. (*)

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

When source code is written.


When a new image is added to the class.
When a new instance of the class is created. (*)
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)

x (*)
z
y (*)
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?

True (*) False

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

> (*)
<
= =
! =

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?

True False (*)

46. In the Greenfoot IDE, which of the following is not a property of an


instance?

Position
Inherited methods
Scenario name (*)
Defined methods

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

48. In the Greenfoot IDE, which of the following are components of a parameter?
(Choose all correct answers)

Parameter type (*)


Parameter return
Parameter name (*)
Parameter method
Parameter void

49. From your Greenfoot lessons, what is incorrect in this code example:
setLocation(getX(), (int) (altitude);

Spacing
Capitalization
Parenthesis (*)
Comma

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

Define the problem.


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

Section 2

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


process? Mark for Review
(1) Points

Sell the animation (*)

Define the scenario

Run the animation

Design a storyboard

Program the animation

Correct

2. In Alice, which of the following programming statements moves the butterfly


forward, double the distance to the tree? Mark for Review
(1) Points

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

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}

this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}

Correct

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

True (*)

False

Correct

4. In Alice, we use the While control statement to implement the conditional


loop. True or false? Mark for Review
(1) Points

True (*)

False
Correct

5. A loop can be infinite (continue forever) or conditional (stops upon a


condition). True or false? Mark for Review
(1) Points

True (*)

False

Section 2

6. In Alice, procedural abstraction is the concept of making code easier to


understand and reuse. True or false? Mark for Review
(1) Points

True (*)

False

Correct

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


the procedure? Mark for Review
(1) Points

MyClownFish class and MySwimmer class

MyClownFish class (*)

MyPajamaFish class, MyClownFish class, and MySwimmer class

Any class with "Fish" in the class name

Incorrect. Refer to Section 2 Lesson 4.

8. 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)

It makes the animation easier to run.

It makes the scene easier to view.

It simplifies code and makes it easier to read. (*)

It allows many objects of a class to use the same procedure. (*)

It can allow subclasses of a superclass to use a procedure. (*)


Incorrect. Refer to Section 2 Lesson 4.

9. In Alice, which of the following instructions move the Blue Tang fish forward
2 meters? Mark for Review
(1) Points

this.blueTang move Forward 0.2

this.blueTang move Forward 2

this.blueTang move Backward 2

this.blueTang move Forward 2.0 (*)

Correct

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

Sequence control

Sequential control (*)

Control order

Order control

Incorrect. Refer to Section 2 Lesson 3.

Section 2

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

playSound

playAudio (*)

playSoundFile

playFile

Incorrect. Refer to Section 2 Lesson 3.

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

True
False (*)

Correct

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

True

False (*)

Incorrect. Refer to Section 2 Lesson 8.

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

True (*)

False

Incorrect. Refer to Section 2 Lesson 8.

15. Expressions with relational operators produce true and false values. True
or false?
Mark for Review
(1) Points
True (*)
False

Correct

16. Which of the following does not describe variables? Mark for Review
(1) Points

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

Has a unique name.

Has a type associated with it.

Arranged in rows and columns. (*)

Correct

17. From your Alice lessons, a Do Together statement embedded with two move
statements is an example of what? Mark for Review
(1) Points
Harmony

Compilation

Forward thinking

Nesting (*)

Incorrect. Refer to Section 2 Lesson 5.

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

True

False (*)

Incorrect. Refer to Section 2 Lesson 5.

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

True

False (*)

Incorrect. Refer to Section 2 Lesson 5.

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

Proximity and size

Distance to and nesting

Proximity, size, spatial relation, and point of view (*)

Proximity and point of view

Correct

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


structure? Mark for Review
(1) Points

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.

Correct

22. Which of the following statements about methods is false? Mark for Review
(1) Points

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

Methods whose return type is not void are required to include a return
statement specifying what to return.

The order in which methods are listed within the class is not important.

Java does not permit nesting one method definition within another method's
definition.

Incorrect. Refer to Section 2 Lesson 10.

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

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.

Correct

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

(Choose all correct answers)

x (*)

y (*)

z (*)

All of the above


Incorrect. Refer to Section 2 Lesson 2.

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

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.

Correct

Section 3

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

private Dog extends World

public class Dog extends World

public class Duke extends Animal (*)

private class extends Actor

private class extends Duke

Correct

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


Mark for Review
(1) Points

True (*)

False

Correct

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

True (*)

False
Correct

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

True

False (*)

Correct

30. What does the following Greenfoot programming statement do?

turn(18); Mark for Review


(1) Points

Turn the object 36 degrees.

Turn the object 18 degrees. (*)

Turn the object 18 steps forward.

Move the object 18 steps forward.

Correct

Section 3

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

(Choose all correct answers)

Parameter type (*)

Parameter return

Parameter name (*)

Parameter method

Parameter void

Incorrect. Refer to Section 3 Lesson 2.

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
True

False (*)

Correct

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

(Choose all correct answers)

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. (*)

Incorrect. Refer to Section 3 Lesson 9.

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

True

False (*)

Correct

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

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

name of an integer (as int)

name of a keyboard key (as String)

name of the class (as String)

Incorrect. Refer to Section 3 Lesson 7.

Section 3

36. From your Greenfoot lessons, which line of code is missing something?
Mark for Review
(1) Points

3 (*)

Incorrect. Refer to Section 3 Lesson 12.

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

Use a different operating system.

Use the mouse instead of the keyboard.

Use symbols instead of numbers. (*)

All of the above.

Incorrect. Refer to Section 3 Lesson 12.

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

True (*)

False

Correct

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

Greenfoot.getRandomNumber(30) Mark for Review


(1) Points

A random number between 1 and 30.

A random number between 0 and 30.

A random number between 0 and 29. (*)


A random number between 1 and 29.

Incorrect. Refer to Section 3 Lesson 5.

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

True

False (*)

Correct

Section 3

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

True (*)

False

Correct

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

True

False (*)

Correct

43. In Greenfoot, a local variable is declared at the beginning of a class. True


or false? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 3 Lesson 10.

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

&

&& (*)

Correct

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) Points

True (*)

False

Correct

Section 3

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

The world

The act method (*)

The actor class

The gallery

Correct

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) Points

True (*)

False

Correct

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) Points
True

False (*)

Incorrect. Refer to Section 3 Lesson 8.

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) Points

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. (*)

Correct

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) Points

True

False (*)

Correct

Section 2

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) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

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


cat backward, half the distance to the bird? Mark for Review
(1) Points
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} (*)

[Correct] Correct

3.

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

Mark for Review


(1) Points
True (*)
False

[Correct] Correct

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

True (*)

False

[Correct] Correct

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)

It makes the animation easier to run.

It makes the scene easier to view.


It simplifies code and makes it easier to read. (*)

It allows many objects of a class to use the same procedure. (*)

It can allow subclasses of a superclass to use a procedure. (*)

[Correct] Correct
Section 2

6. In Alice, procedural abstraction is the concept of making code


easier to understand and reuse. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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) Points

True (*)

False

[Correct] Correct

8. From your Alice lessons, variables are fixed and cannot be


changed. True or false? Mark for Review
(1) Points

True

False (*)

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

The Internet

Animation checklist (*)

A close friend

None of the above

[Correct] Correct

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

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 8.

Section 2

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


control structure? Mark for Review
(1) Points

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.

[Correct] Correct

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) Points

An instance

A method (*)

A class

A variable

[Incorrect] Incorrect. Refer to Section 2 Lesson 10.

13. A complete Alice instruction includes which of the following


components? Mark for Review
(1) Points

(Choose all correct answers)

Image

Class

Procedure (*)

Direction (*)

Amount (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

this.blueTang roll Left 1.0 (*)

this.blueTang Left 1.0


this.blueTang Left 1

this.blueTang roll Left 1

[Correct] Correct

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

True (*)

False

[Correct] Correct

Section 2

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


Mark for Review
(1) Points

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.

[Correct] Correct

17. From your Alice lessons, an instance's properties cannot be


modified. True or false? Mark for Review
(1) Points

True

False (*)
[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

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

True

False (*)

[Correct] Correct

19. What Alice tool can be used to diagram the If conditional


execution statement? Mark for Review
(1) Points

Cause and effect diagram

Process flow diagram (*)

Conditional flow diagram

[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

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

True (*)

False

[Correct] Correct

Section 2

21. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True
False (*)

[Correct] Correct

22. In Alice, which of the following arguments are available to


further refine an object's movements? Mark for Review
(1) Points

(Choose all correct answers)

Object

Distance (*)

Duration (*)

Delay

[Incorrect] Incorrect. Refer to Section 2 Lesson 5.

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

Above each set of programming statements. (*)

At the end of the program.

In the scene editor.

In their own procedure.

[Correct] Correct

24. In Alice, once procedures are added to a control statement, they


cannot be changed. True or false? Mark for Review
(1) Points

True
False (*)

[Correct] Correct

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

True

False (*)

[Correct] Correct

Section 3

26. Which of the following demonstrates a Greenfoot


subclass/superclass relationship? Mark for Review
(1) Points

A dog is a subclass of the cat superclass.

A rose is a subclass of the flower superclass. (*)

A computer is a subclass of a video game superclass.

A single person is a superclass of the human subclass.

[Correct] Correct

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


Mark for Review
(1) Points

(Choose all correct answers)

Run (*)

Act (*)
Speed (*)

Move

Turn

[Correct] Correct

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

True

False (*)

[Correct] Correct

29. From your Greenfoot lessons, which type of constructor can be


used to automate creation of Actor instances? Mark for Review
(1) Points

Animal

World (*)

Actor

Vector

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

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) Points

True
False (*)

[Correct] Correct

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) Points

Write the code.

Inspect the instances.

Review the documentation.

Compile the code. (*)

[Correct] Correct

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


something?

Mark for Review


(1) Points

3 (*)

6
[Correct] Correct

33. In Greenfoot, you may perform the programming tasks of create and
test many times. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

True

False (*)

[Correct] Correct

35. In Greenfoot, which method checks if a key on the keyboard has


been pressed? Mark for Review
(1) Points

keyPress method

keyUp method

keyDown method (*)

keyClick method

[Incorrect] Incorrect. Refer to Section 3 Lesson 7.

Section 3

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) Points
True (*)

False

[Correct] Correct

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) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

38. In Greenfoot, an if-statement is used to alternate between


displaying two images in an instance. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

39. In Greenfoot, a local variable is declared at the beginning of a


class. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

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

I (*)

[Correct] Correct

Section 3

41. In Greenfoot, which of the following statements could prevent an


infinite loop from occurring? Mark for Review
(1) Points

I = 100 + i

i=1

i = i

i = i + 1 (*)

[Correct] Correct

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) Points

True (*)

False

[Correct] Correct

43. To execute a method in your Greenfoot game, where is it called


from? Mark for Review
(1) Points

The world

The act method (*)

The actor class

The gallery

[Incorrect] Incorrect. Refer to Section 3 Lesson 6.

44. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

45. In the Greenfoot IDE, which of the following is not a property of


an instance? Mark for Review
(1) Points

Position

Inherited methods

Scenario name (*)

Defined methods

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.


Section 3

46. What does the following Greenfoot programming statement do?

turn(18); Mark for Review


(1) Points
Turn the object 36 degrees.

Turn the object 18 degrees. (*)

Turn the object 18 steps forward.

Move the object 18 steps forward.

[Correct] Correct

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


Mark for Review
(1) Points

orientTo( );

turnAround( );

move ( );

turn( ); (*)

[Correct] Correct

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) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 9.

49. Use your Greenfoot knowldege: Abstraction occurs in many


different ways in programming. True or false? Mark for Review
(1) Points
True (*)

False

[Correct] Correct

50. In Greenfoot, what happens if the condition is false in an if-


statement? Mark for Review
(1) Points

The programming statements are executed.

The if-statement is executed.

The act method is deleted.

The programming statements are not executed. (*)

[Correct] Correct

MIDTERM 1 VAR 2

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


� Slowing movements down.
� Using math operators. (*)
� 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 simulateProcess 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 VAR 2

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


� Slowing movements down.
� Using math operators. (*)
� 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 simulateProcess 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

1. A typical application uses various values and these values continuously


change while the program is running. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

2.

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

Mark for Review


(1) Points
True (*)
False

[Correct] Correct

3. In Alice, new procedures that are declared for an instance appear


in the procedures tab in the methods panel. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

4. In Alice, procedural abstraction is the concept of making code


easier to understand and reuse. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

5. In Alice, a person object inherits its procedures, functions, and


properties from which of the following classes? Mark for Review
(1) Points

(Choose all correct answers)

Object subclass

Biped class (*)

Quadruped class

Person subclass (*)

[Correct] Correct

6. The Alice gallery is a collection of 2D models that can be inserted into the
scene. True or false? Mark for Review
(1) Points

True

False (*)
[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

7. From your Alice lessons, how can you locate objects in the Alice
gallery? Mark for Review
(1) Points

(Choose all correct answers)

Look on your computer network.

Browse through the folders of classes. (*)

Import objects.

Search for objects by keyword. (*)

[Correct] Correct

8. Which of the following are steps to use "drag-and-drop"


positioning to position an Alice object in a scene? Mark for Review
(1) Points

Select the object with your cursor.

Using your cursor, position the object in the scene.

Select a handle style.

All of the above (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

9. 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
(1) Points

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}

[Correct] Correct

10. How do you copy an Alice procedure? Mark for Review


(1) Points

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.

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

playSound

playAudio (*)

playSoundFile

playFile

[Correct] Correct

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

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

True (*)

False

[Correct] Correct

14. 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
(1) Points

True

False (*)

[Correct] Correct

15. From your Alice lessons, what can be used as a guideline to


ensure your animation fulfills animation principles? Mark for Review
(1) Points

The Internet

Animation checklist (*)

A close friend

None of the above


[Correct] Correct

16. A flowchart shows what happens in an Alice animation if an action takes


place, or does not take place. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

17. Which of the following does not describe methods? Mark for
Review
(1) Points

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. (*)

[Correct] Correct

18. In Java, a function is a method that returns a value. True or


false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

19. Do In Order and Do Together are the only control statements


available in Alice. True or false? Mark for Review
(1) Points
True

False (*)

[Correct] Correct

20. In Alice, once procedures are added to a control statement, they


cannot be changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

21. In Alice, functions are dragged into the control statement, not the
procedure. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

22. In Alice, which function is used to move an object directly to


the center point of another object? Mark for Review
(1) Points

getObject

getDuration

getDepth

getDistance (*)
[Correct] Correct

23. A conditional loop is a loop that will continue forever. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

24. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

25. In Alice, we use the While control statement to implement the


conditional loop. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

True

False (*)
[Correct] Correct

27. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

28. What type of parameter does the Greenfoot playSound method


expect? Mark for Review
(1) Points

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

name of an integer (as int)

name of a keyboard key (as String)

name of the class (as String)

[Correct] Correct

29. In Greenfoot, what type of parameter does the keyDown method


expect? Mark for Review
(1) Points

String (*)

Boolean
Integer

Method

[Correct] Correct

30. In the Greenfoot IDE, what symbols indicate that the variable is
an array? Mark for Review
(1) Points

Square brackets [ ] (*)

Curly brackets { }

Semicolon ;

Colon :

[Correct] Correct

31. In Greenfoot, what type of symbol is used to connect boolean expressions?


Mark for Review
(1) Points

String concatenation

Logic operators (*)

Integers

Keyboard key names

[Correct] Correct

32. In Greenfoot, when is a local variable most often used? Mark


for Review
(1) Points
Within the scenario

Within the act method

Within the world constructor

Within loop constructs (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

33. In Greenfoot, constructors can be used to create new instances of


objects. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

34. 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")); Mark for Review


(1) Points

setImage

GreenfootImage

duke100.png (*)

new

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

35. From your Greenfoot lessons, where should the stop method be
inserted into the source code? Mark for Review
(1) Points
In the defined method.

In the act method. (*)

In the import statement.

In the class header.

[Correct] Correct

36. 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
(1) Points

True (*)

False

[Correct] Correct

37. In Greenfoot, a subclass is created by right-clicking on a


superclass. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

38. In Greenfoot, you must first create an instance before you create
a class. True or false? Mark for Review
(1) Points

True

False (*)
[Correct] Correct

39. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points

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.

[Correct] Correct

40. 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) Points

True (*)

False

[Correct] Correct

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

True (*)

False

[Correct] Correct

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


identified? Mark for Review
(1) Points

Define the problem.

Design the solution.

Program the solution. (*)

Test the solution.

[Correct] Correct

43. From your Greenfoot lessons, which of the following is an example


of changing the environment during a Q/A test cycle? Mark for Review
(1) Points

Use a different operating system. (*)

Use the mouse instead of the keyboard.

Use symbols instead of numbers.

All of the above.

[Incorrect] Incorrect. Refer to Section 3 Lesson 12.

44. From your Greenfoot lessons, in an if-statement, the programming


statements written in curly brackets are executed simultaneously. True or false?
Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 3.

45. From your Greenfoot lessons, which axes define an object's


position in a world? Mark for Review
(1) Points

(Choose all correct answers)

x (*)

y (*)

[Correct] Correct

46. When a Greenfoot code segment is executed in an if-statement, each line of


code is executed in sequential order. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

True

False (*)

[Correct] Correct

48. What type of Greenfoot method would be used to turn an object?


Mark for Review
(1) Points

orientTo( );
turnAround( );

move ( );

turn( ); (*)

[Correct] Correct

49. 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) Points

True (*)

False

[Correct] Correct

50. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points

In the computer network

In the Greenfoot image gallery

In the scene editor

In the documentation (*)

[Correct] Correct

1. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True

False (*)
[Correct] Correct

2. In Alice, we use the While control statement to implement the


conditional loop. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

3. A loop can be infinite (continue forever) or conditional (stops


upon a condition). True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

True (*)

False

[Correct] Correct

5. 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) Points

True (*)
False

[Correct] Correct

6. From your Alice lessons, animations should be tested by the programmer before
they are considered complete. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

True (*)

False

[Correct] Correct

8. Which Alice control statement executes a set of procedures in


order? Mark for Review
(1) Points

Do in order (*)

Do together

If

For each in

Variable
[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

9. The amount that an Alice object moves is in what metric? Mark


for Review
(1) Points

Feet

Centimeters

Meters (*)

Millimeters

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

10. In Alice, inheritance means that the superclass inherits its


traits from the subclass. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

11. In Alice, a person object inherits its procedures, functions, and properties
from which of the following classes? Mark for Review
(1) Points

(Choose all correct answers)

Object subclass

Biped class (*)

Quadruped class

Person subclass (*)


[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

12. In Alice, objects inherit the characteristics of their: Mark


for Review
(1) Points

Code

Project

Class (*)

Program

[Correct] Correct

13. Alice uses built-in math operators; they are: Mark for Review
(1) Points

Add and subtract

Multiply and divide

All of the above (*)

None of the above

[Correct] Correct

14. In Alice, where are arithmetic operators available? Mark for


Review
(1) Points

(Choose all correct answers)

Amount argument (*)

Size argument

Duration argument (*)


Get Distance functions (*)

If control

[Incorrect] Incorrect. Refer to Section 2 Lesson 9.

15. Results of arithmetic operations cannot be stored in a variable.


True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

16. 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
(1) Points

while loop

if (*)

array

boolean

[Correct] Correct

17. You have a Class representing Cat. Each Cat can meow, purr, catch
mice, and so on. When you create a new cat, what is it called? Mark for Review
(1) Points

A submethod

A subprogram

An instance (*)
A subclass

A variable class

[Correct] Correct

18. From your Alice lessons, once you select an instance, you will
add a class to the scene. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

19. Which of the following is a procedure to precisely position an


Alice object? Mark for Review
(1) Points

Move

Turn

Roll

MoveToward

All of the above (*)

[Correct] Correct

20. From your Alice lessons, it is valuable to save a version of your


Alice animation scene after objects have been repositioned. True or false? Mark
for Review
(1) Points

True (*)
False

[Correct] Correct

21. From your Alice lessons, if you examined a science process that had many
steps, which of the following is a way that you could apply functional
decomposition to this process? Mark for Review
(1) Points

1. Present the problem as an animation.


2. Further refine and define the tasks needed for each high level step.
3. Identify the high level steps for the science concept.

1. Identify the detailed steps for the science concept.


2. Present the problem as an animation.

Present the problem as an animation.

1. Identify the high level steps for the science concept.


2. Further refine and define the tasks needed for each high level step.
3. Present the problem as an animation. (*)

[Correct] Correct

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


Mark for Review
(1) Points

True

False (*)

[Correct] Correct

23. Which of the following are examples of comments written in an


Alice program? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

24. Do In Order and Do Together are the only control statements


available in Alice. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

25. In Alice, which function is used to move an object directly to


the center point of another object? Mark for Review
(1) Points

getObject

getDuration

getDepth

getDistance (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 5.

26. From your Greenfoot lessons, which of the following are examples of
abstraction? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

27. Use your Greenfoot knowldege: Abstraction occurs in many


different ways in programming. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

28. Which method is used to play sound in your Greenfoot game? Mark
for Review
(1) Points

getSound method

findSound method

playSound method (*)

importSound method

[Correct] Correct

29. In Greenfoot, which method checks if a key on the keyboard has


been pressed? Mark for Review
(1) Points

keyPress method
keyUp method

keyDown method (*)

keyClick method

[Correct] Correct

30. Read the following method signature. Using your Greenfoot


experience, what does this method do?

public static int getRandomNumber (int limit) Mark for Review


(1) Points

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.

[Correct] Correct

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

True (*)

False

[Correct] Correct

32. In Greenfoot, you can use comparison operators to compare a


variable to a random number. True or false? Mark for Review
(1) Points

True (*)
False

[Correct] Correct

33. In Greenfoot, which of the following are execution controls?


Mark for Review
(1) Points

(Choose all correct answers)

Run (*)

Act (*)

Speed (*)

Move

Turn

[Correct] Correct

34. From your Greenfoot lessons, to create a new instance of the Duke
class, you right-click on the class, then select which of the following commands in
the class menu? Mark for Review
(1) Points

New subclass...

Set image...

new Duke() (*)

Inspect

Remove

[Incorrect] Incorrect. Refer to Section 3 Lesson 1.

35. In Greenfoot, objects are created from: Mark for Review


(1) Points

Methods

Classes (*)

Signatures

Parameters

[Correct] Correct

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

Use a different operating system.

Use the mouse instead of the keyboard.

Use symbols instead of numbers. (*)

All of the above.

[Correct] Correct

37. In Greenfoot, a method with what kind of return type is used to


learn more about an object's orientation? Mark for Review
(1) Points

non-void return type (*)

void return type

object return type

method return type

[Incorrect] Incorrect. Refer to Section 3 Lesson 3.


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

True (*)

False

[Correct] Correct

39. From your Greenfoot lessons, to save space in the act method, you
can write an entirely new method below it, called a _____________. Mark for
Review
(1) Points

Class method

Instance method

Defined method (*)

World method

Code method

[Correct] Correct

40. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

41. From your Greenfoot lessons, where should the stop method be inserted into
the source code? Mark for Review
(1) Points
In the defined method.

In the act method. (*)

In the import statement.

In the class header.

[Correct] Correct

42. 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) Points

True (*)

False

[Correct] Correct

43. In Greenfoot, which method is used to add a new instance to a


scenario when the world is initialized? Mark for Review
(1) Points

addClass

addWorld

addObject (*)

addInstance

[Correct] Correct

44. 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) Points
True

False (*)

[Correct] Correct

45. In the following Greenfoot method signature, which is the method


name?

void turnLeft() Mark for Review


(1) Points

()

void

turnLeft (*)

Left

[Correct] Correct

46. In the Greenfoot IDE, which of the following is not a property of an


instance? Mark for Review
(1) Points

Position

Inherited methods

Scenario name (*)

Defined methods

[Correct] Correct

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


Mark for Review
(1) Points
orientTo( );

turnAround( );

move ( );

turn( ); (*)

[Correct] Correct

48. 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? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

49. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points

A statement that executes one segment of code.

A statement that can execute a section of code multiple times. (*)

A statement that can execute a section of code one time.

A statement that can execute a method multiple times.

[Correct] Correct

50. In a Greenfoot loop constructor, which component is a counter


that controls how many times the statement is executed? Mark for Review
(1) Points

Local loop
While loop

Loop variable (*)

Condition

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

1. The Alice If control structure requires the false statement to be populated.


True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

2. What Alice tool can be used to diagram the If conditional


execution statement? Mark for Review
(1) Points

Cause and effect diagram

Process flow diagram (*)

Conditional flow diagram

[Correct] Correct

3. In Alice, we use the While control statement to implement the


conditional loop. True or false? Mark for Review
(1) Points

True (*)

False
[Correct] Correct

4. In Alice, if a procedure is declared for MyClownFish, which


classes can use the procedure? Mark for Review
(1) Points

MyClownFish class and MySwimmer class

MyClownFish class (*)

MyPajamaFish class, MyClownFish class, and MySwimmer class

Any class with "Fish" in the class name

[Correct] Correct

5. In Alice, new procedures that are declared for an instance appear


in the procedures tab in the methods panel. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

6. 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
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

7. All objects in Alice have three dimensional coordinates on which


axes? Mark for Review
(1) Points

(Choose all correct answers)

x (*)

y (*)

z (*)

All of the above

[Correct] Correct

8. The Alice gallery is a collection of 2D models that can be


inserted into the scene. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

9. Which of the following is a procedure to precisely position an


Alice object? Mark for Review
(1) Points

Move
Turn

Roll

MoveToward

All of the above (*)

[Correct] Correct

10. From your Alice lessons, animations should be tested by the


programmer before they are considered complete. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

The Internet

Animation checklist (*)

A close friend

None of the above

[Correct] Correct

12. Define the value of the variable LapCount based on the following
math calculation: LapCount + 10 = 15 Mark for Review
(1) Points
2

5 (*)

15

10

[Correct] Correct

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


butterfly forward, double the distance to the tree? Mark for Review
(1) Points

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

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}

this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}

[Correct] Correct

14. From your Alice lessons, which of the following is a tool to show
the logic of an animation? Mark for Review
(1) Points

Visual storyboard

Flowchart (*)

Pie chart

Scene editor

Class chart
[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

15. If you need to repeat a group of Java statements many times,


which Java construct should you use? Mark for Review
(1) Points

(Choose all correct answers)

repeat...until

do while loop (*)

while loop (*)

if

[Correct] Correct

16. Java programs can be simple programs that run from the command line, or they
can have complex graphical user interfaces. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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


(1) Points

Are move statements

Are control statements (*)

Are complex statements

None of the above


[Correct] Correct

18. In Alice, once procedures are added to a control statement, they


cannot be changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

19. In Alice, the vehicle property will associate one object to


another. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

20. In Alice, which of the following arguments are available to


further refine an object's movements? Mark for Review
(1) Points

(Choose all correct answers)

Object

Distance (*)

Duration (*)

Delay

[Correct] Correct

21. The Alice code editor contains the tools you need to set up the
background template and objects in the scene. True or false? Mark for Review
(1) Points
True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

this.blueTang roll Left 1.0 (*)

this.blueTang Left 1.0

this.blueTang Left 1

this.blueTang roll Left 1

[Correct] Correct

23. How do you copy an Alice procedure? Mark for Review


(1) Points

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.

[Correct] Correct

24. If the value already exists in the variable it is overwritten by


the assignment operator (=). True or false? Mark for Review
(1) Points
True (*)

False

[Correct] Correct

25. What is the output produced by the following code?

Mark for Review


(1) Points

j is 5
k is 5 (*)

j is 10
j is 5
k is 5

j is 10
k is 10

j is 15
k is 15

[Incorrect] Incorrect. Refer to Section 2 Lesson 9.

26. From your Greenfoot lessons, which of the following is an example of a type
of data passed through a parameter? Mark for Review
(1) Points

Methods

Classes

Integers (*)

Scenarios

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.


27. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points

In the computer network

In the Greenfoot image gallery

In the scene editor

In the documentation (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

28. In Greenfoot, instances inherit the characteristics of the


subclass they belong to, but not the superclass. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

29. Using the Greenfoot IDE, which of the following programming


statements tells the object to turn 38 degrees? Mark for Review
(1) Points

move():

move(2);

turn(38); (*)

turn(38):

[Correct] Correct

30. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

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

True

False (*)

[Correct] Correct

32. In Greenfoot, what type of parameter does the keyDown method


expect? Mark for Review
(1) Points

String (*)

Boolean

Integer

Method

[Correct] Correct
33. What type of parameter does the Greenfoot playSound method
expect? Mark for Review
(1) Points

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

name of an integer (as int)

name of a keyboard key (as String)

name of the class (as String)

[Correct] Correct

34. 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) Points

True

False (*)

[Correct] Correct

35. Which class holds the method that ends a Greenfoot game? Mark
for Review
(1) Points

Greenfoot (*)

Class

GreenfootImage

Actor

36. Using Greenfoot, how do we change the size and resolution of the
World instance? Mark for Review
(1) Points

Edit the methods in the class.

Edit the values in the constructor. (*)

Delete the instance.

Edit the values in the class's act method.

[Correct] Correct

37. From your Greenfoot lessons, which of the following is an example


of changing the environment during a Q/A test cycle? Mark for Review
(1) Points

Use a different operating system. (*)

Use the mouse instead of the keyboard.

Use symbols instead of numbers.

All of the above.

[Correct] Correct

38. Programming tasks to create a Greenfoot game typically occur in


the following order:

1.Define the problem.


2.Design the solution.
3.Program the solution.
4.Test the solution.

True or false? Mark for Review


(1) Points

True (*)

False
[Correct] Correct

39. In Greenfoot, a subclass is created by right-clicking on a


superclass. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

40. From your Greenfoot lessons, to create a new instance of the Duke
class, you right-click on the class, then select which of the following commands in
the class menu? Mark for Review
(1) Points

New subclass...

Set image...

new Duke() (*)

Inspect

Remove

[Correct] Correct

41. To execute a method in your Greenfoot game, where is it called from? Mark
for Review
(1) Points

The world

The act method (*)

The actor class


The gallery

[Correct] Correct

42. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

43. 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) Points

True (*)

False

[Correct] Correct

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


that controls how many times the statement is executed? Mark for Review
(1) Points

Local loop

While loop

Loop variable (*)

Condition

[Correct] Correct
45. 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? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

46. In Greenfoot, what type of symbol is used to connect boolean expressions?


Mark for Review
(1) Points

String concatenation

Logic operators (*)

Integers

Keyboard key names

[Correct] Correct

47. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points

(Choose all correct answers)

Galleries

Classes (*)

Scenarios

Objects (*)

All of the above


[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

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


operators represents "greater than"? Mark for Review
(1) Points

> (*)

<

= =

! =

[Correct] Correct

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

True

False (*)

[Correct] Correct

50. From your Greenfoot lessons, what are the ways that you can view
a class's methods? Mark for Review
(1) Points

(Choose all correct answers)

In the scenario

In the class's documentation (*)

By right-clicking on an instance (*)

In the Greenfoot gallery


[Correct] Correct

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


statement?
Cause and effect diagram
Process flow diagram (*)
Conditional flow diagram

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

True False (*)

3. From your Alice lessons, the If control structure can process one true and
one false response. True or false
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?
True (*) False

5. Identify an example of an Alice expression.


"I feel happy."
If or Where
3x3=9 (*)
None of the above

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


Are move statements
Are control statements (*)
Are complex statements
None of the above

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

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

9. Do In Order and Do Together are the only control statements available in


Alice. True or false?
True False (*)

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

Code
Project
Class (*)
Program
11. In Alice, when a new procedure is declared, its motions are coded in a
separate tab. True or false?
True (*) False

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

Object subclass
Biped class (*)
Quadruped class
Person subclass (*)

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

14. Define the value of the variable LapCount based on the following math
calculation: LapCount + 10 = 15
2
4
5 (*)
15
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?

True (*) 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.
Has a unique name.
Has a type associated with it.
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?
True (*) False

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


object?
Move
Turn
Roll
MoveToward
All of the above (*)

19. All objects in Alice have three dimensional coordinates on which axes?
(Choose all correct answers)
x (*)
y (*)
z (*)
w
All of the above

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

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. Each parameter is listed with its name first, then its data type. True
or false?
True False (*)

23. Which Alice execution task corresponds with the following storyboard
statement?
Cat turns to face mouse.

this.mouse turnToFace this.cat


mouse turnTo cat
this.cat turnToFace this.mouse (*)
cat TurnTo mouse

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


something?
talk
speak
say (*)
audible

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

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

String (*)
Boolean
Integer
Method

27. From your Greenfoot lessons, the keyDown method is located in which
class?
Actor
Greenfoot (*)
GreenfootImage
World

28. From your Greenfoot lessons, if the condition in an if-statement is


true, the first code segment is executed. True or false?
True (*) False

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

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

31. In Greenfoot, you must first create an instance before you create a class.
True or false?
True 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?
True False (*)

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

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?

True (*) False

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

36. In Greenfoot, which of the following statements could prevent an infinite


loop from occurring?
I = 100 + i
i=1
i = i
i = i + 1 (*)

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


concatenation?

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");

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

&
&& (*)
=
!

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

40. 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. (*)

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

When source code is written.


When a new image is added to the class.
When a new instance of the class is created. (*)
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)

x (*)
z
y (*)
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?

True (*) False

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

> (*)
<
= =
! =

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?

True False (*)

46. In the Greenfoot IDE, which of the following is not a property of an


instance?

Position
Inherited methods
Scenario name (*)
Defined methods

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

48. In the Greenfoot IDE, which of the following are components of a parameter?
(Choose all correct answers)

Parameter type (*)


Parameter return
Parameter name (*)
Parameter method
Parameter void

49. From your Greenfoot lessons, what is incorrect in this code example:
setLocation(getX(), (int) (altitude);

Spacing
Capitalization
Parenthesis (*)
Comma

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

Define the problem.


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

Section 2

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


process? Mark for Review
(1) Points

Sell the animation (*)

Define the scenario

Run the animation

Design a storyboard

Program the animation

Correct

2. In Alice, which of the following programming statements moves the butterfly


forward, double the distance to the tree? Mark for Review
(1) Points

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

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}


this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}

Correct

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

True (*)

False

Correct

4. In Alice, we use the While control statement to implement the conditional


loop. True or false? Mark for Review
(1) Points

True (*)

False

Correct

5. A loop can be infinite (continue forever) or conditional (stops upon a


condition). True or false? Mark for Review
(1) Points

True (*)

False

Section 2

6. In Alice, procedural abstraction is the concept of making code easier to


understand and reuse. True or false? Mark for Review
(1) Points

True (*)

False

Correct

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


the procedure? Mark for Review
(1) Points

MyClownFish class and MySwimmer class

MyClownFish class (*)


MyPajamaFish class, MyClownFish class, and MySwimmer class

Any class with "Fish" in the class name

Incorrect. Refer to Section 2 Lesson 4.

8. 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)

It makes the animation easier to run.

It makes the scene easier to view.

It simplifies code and makes it easier to read. (*)

It allows many objects of a class to use the same procedure. (*)

It can allow subclasses of a superclass to use a procedure. (*)

Incorrect. Refer to Section 2 Lesson 4.

9. In Alice, which of the following instructions move the Blue Tang fish forward
2 meters? Mark for Review
(1) Points

this.blueTang move Forward 0.2

this.blueTang move Forward 2

this.blueTang move Backward 2

this.blueTang move Forward 2.0 (*)

Correct

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

Sequence control

Sequential control (*)

Control order

Order control

Incorrect. Refer to Section 2 Lesson 3.


Section 2

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

playSound

playAudio (*)

playSoundFile

playFile

Incorrect. Refer to Section 2 Lesson 3.

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

True

False (*)

Correct

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

True

False (*)

Incorrect. Refer to Section 2 Lesson 8.

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

True (*)

False

Incorrect. Refer to Section 2 Lesson 8.

15. Expressions with relational operators produce true and false values. True
or false?
Mark for Review
(1) Points
True (*)
False

Correct

16. Which of the following does not describe variables? Mark for Review
(1) Points

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

Has a unique name.

Has a type associated with it.

Arranged in rows and columns. (*)

Correct

17. From your Alice lessons, a Do Together statement embedded with two move
statements is an example of what? Mark for Review
(1) Points

Harmony

Compilation

Forward thinking

Nesting (*)

Incorrect. Refer to Section 2 Lesson 5.

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

True

False (*)

Incorrect. Refer to Section 2 Lesson 5.

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

True

False (*)
Incorrect. Refer to Section 2 Lesson 5.

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

Proximity and size

Distance to and nesting

Proximity, size, spatial relation, and point of view (*)

Proximity and point of view

Correct

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


structure? Mark for Review
(1) Points

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.

Correct

22. Which of the following statements about methods is false? Mark for Review
(1) Points

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

Methods whose return type is not void are required to include a return
statement specifying what to return.

The order in which methods are listed within the class is not important.

Java does not permit nesting one method definition within another method's
definition.

Incorrect. Refer to Section 2 Lesson 10.

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

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.

Correct

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

(Choose all correct answers)

x (*)

y (*)

z (*)

All of the above

Incorrect. Refer to Section 2 Lesson 2.

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

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.

Correct

Section 3

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

private Dog extends World

public class Dog extends World

public class Duke extends Animal (*)

private class extends Actor

private class extends Duke


Correct

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


Mark for Review
(1) Points

True (*)

False

Correct

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

True (*)

False

Correct

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

True

False (*)

Correct

30. What does the following Greenfoot programming statement do?

turn(18); Mark for Review


(1) Points

Turn the object 36 degrees.

Turn the object 18 degrees. (*)

Turn the object 18 steps forward.

Move the object 18 steps forward.

Correct

Section 3
31. In the Greenfoot IDE, which of the following are components of a parameter?
Mark for Review
(1) Points

(Choose all correct answers)

Parameter type (*)

Parameter return

Parameter name (*)

Parameter method

Parameter void

Incorrect. Refer to Section 3 Lesson 2.

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

True

False (*)

Correct

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

(Choose all correct answers)

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. (*)

Incorrect. Refer to Section 3 Lesson 9.

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

True
False (*)

Correct

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

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

name of an integer (as int)

name of a keyboard key (as String)

name of the class (as String)

Incorrect. Refer to Section 3 Lesson 7.

Section 3

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

Mark for Review


(1) Points

3 (*)

Incorrect. Refer to Section 3 Lesson 12.

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

Use a different operating system.

Use the mouse instead of the keyboard.

Use symbols instead of numbers. (*)

All of the above.

Incorrect. Refer to Section 3 Lesson 12.


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

True (*)

False

Correct

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

Greenfoot.getRandomNumber(30) Mark for Review


(1) Points

A random number between 1 and 30.

A random number between 0 and 30.

A random number between 0 and 29. (*)

A random number between 1 and 29.

Incorrect. Refer to Section 3 Lesson 5.

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

True

False (*)

Correct

Section 3

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

True (*)

False

Correct

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

True

False (*)

Correct

43. In Greenfoot, a local variable is declared at the beginning of a class. True


or false? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 3 Lesson 10.

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

&

&& (*)

Correct

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) Points

True (*)

False

Correct

Section 3

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

The world
The act method (*)

The actor class

The gallery

Correct

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) Points

True (*)

False

Correct

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) Points

True

False (*)

Incorrect. Refer to Section 3 Lesson 8.

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) Points

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. (*)

Correct

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) Points

True

False (*)
Correct

Section 2

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) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

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


cat backward, half the distance to the bird? Mark for Review
(1) Points

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} (*)

[Correct] Correct

3.

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

Mark for Review


(1) Points
True (*)
False

[Correct] Correct

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

True (*)

False

[Correct] Correct

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)

It makes the animation easier to run.

It makes the scene easier to view.

It simplifies code and makes it easier to read. (*)

It allows many objects of a class to use the same procedure. (*)

It can allow subclasses of a superclass to use a procedure. (*)

[Correct] Correct
Section 2

6. In Alice, procedural abstraction is the concept of making code


easier to understand and reuse. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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) Points
True (*)

False

[Correct] Correct

8. From your Alice lessons, variables are fixed and cannot be


changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

9. From your Alice lessons, what can be used as a guideline to


ensure your animation fulfills animation principles? Mark for Review
(1) Points

The Internet

Animation checklist (*)

A close friend

None of the above

[Correct] Correct

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

True (*)

False

[Incorrect] Incorrect. Refer to Section 2 Lesson 8.


Section 2

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


control structure? Mark for Review
(1) Points

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.

[Correct] Correct

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) Points

An instance

A method (*)

A class

A variable

[Incorrect] Incorrect. Refer to Section 2 Lesson 10.

13. A complete Alice instruction includes which of the following


components? Mark for Review
(1) Points

(Choose all correct answers)

Image

Class
Procedure (*)

Direction (*)

Amount (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

this.blueTang roll Left 1.0 (*)

this.blueTang Left 1.0

this.blueTang Left 1

this.blueTang roll Left 1

[Correct] Correct

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

True (*)

False

[Correct] Correct

Section 2

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


Mark for Review
(1) Points

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.

[Correct] Correct

17. From your Alice lessons, an instance's properties cannot be


modified. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

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

True

False (*)

[Correct] Correct

19. What Alice tool can be used to diagram the If conditional


execution statement? Mark for Review
(1) Points

Cause and effect diagram

Process flow diagram (*)

Conditional flow diagram


[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

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

True (*)

False

[Correct] Correct

Section 2

21. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

22. In Alice, which of the following arguments are available to


further refine an object's movements? Mark for Review
(1) Points

(Choose all correct answers)

Object

Distance (*)

Duration (*)

Delay

[Incorrect] Incorrect. Refer to Section 2 Lesson 5.

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

Above each set of programming statements. (*)

At the end of the program.

In the scene editor.

In their own procedure.

[Correct] Correct

24. In Alice, once procedures are added to a control statement, they


cannot be changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

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

True

False (*)

[Correct] Correct

Section 3

26. Which of the following demonstrates a Greenfoot


subclass/superclass relationship? Mark for Review
(1) Points

A dog is a subclass of the cat superclass.


A rose is a subclass of the flower superclass. (*)

A computer is a subclass of a video game superclass.

A single person is a superclass of the human subclass.

[Correct] Correct

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


Mark for Review
(1) Points

(Choose all correct answers)

Run (*)

Act (*)

Speed (*)

Move

Turn

[Correct] Correct

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

True

False (*)

[Correct] Correct

29. From your Greenfoot lessons, which type of constructor can be


used to automate creation of Actor instances? Mark for Review
(1) Points
Animal

World (*)

Actor

Vector

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

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) Points

True

False (*)

[Correct] Correct

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) Points

Write the code.

Inspect the instances.

Review the documentation.

Compile the code. (*)

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

Mark for Review


(1) Points

3 (*)

[Correct] Correct

33. In Greenfoot, you may perform the programming tasks of create and
test many times. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

True

False (*)

[Correct] Correct

35. In Greenfoot, which method checks if a key on the keyboard has


been pressed? Mark for Review
(1) Points

keyPress method

keyUp method

keyDown method (*)

keyClick method

[Incorrect] Incorrect. Refer to Section 3 Lesson 7.

Section 3

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) Points

True (*)

False

[Correct] Correct

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) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

38. In Greenfoot, an if-statement is used to alternate between


displaying two images in an instance. True or false? Mark for Review
(1) Points

True
False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

39. In Greenfoot, a local variable is declared at the beginning of a


class. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

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

I (*)

[Correct] Correct

Section 3

41. In Greenfoot, which of the following statements could prevent an


infinite loop from occurring? Mark for Review
(1) Points

I = 100 + i

i=1

i = i
i = i + 1 (*)

[Correct] Correct

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) Points

True (*)

False

[Correct] Correct

43. To execute a method in your Greenfoot game, where is it called


from? Mark for Review
(1) Points

The world

The act method (*)

The actor class

The gallery

[Incorrect] Incorrect. Refer to Section 3 Lesson 6.

44. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
45. In the Greenfoot IDE, which of the following is not a property of
an instance? Mark for Review
(1) Points

Position

Inherited methods

Scenario name (*)

Defined methods

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.


Section 3

46. What does the following Greenfoot programming statement do?

turn(18); Mark for Review


(1) Points

Turn the object 36 degrees.

Turn the object 18 degrees. (*)

Turn the object 18 steps forward.

Move the object 18 steps forward.

[Correct] Correct

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


Mark for Review
(1) Points

orientTo( );

turnAround( );

move ( );

turn( ); (*)
[Correct] Correct

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) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 9.

49. Use your Greenfoot knowldege: Abstraction occurs in many


different ways in programming. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

50. In Greenfoot, what happens if the condition is false in an if-


statement? Mark for Review
(1) Points

The programming statements are executed.

The if-statement is executed.

The act method is deleted.

The programming statements are not executed. (*)

[Correct] Correct

MIDTERM 1 VAR 2

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


� Slowing movements down.
� Using math operators. (*)
� 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 simulateProcess 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 VAR 2

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


� Slowing movements down.
� Using math operators. (*)
� 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 simulateProcess 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

1. A typical application uses various values and these values continuously


change while the program is running. True or false? Mark for Review
(1) Points

True (*)
False

[Correct] Correct

2.

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

Mark for Review


(1) Points
True (*)
False

[Correct] Correct

3. In Alice, new procedures that are declared for an instance appear


in the procedures tab in the methods panel. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

4. In Alice, procedural abstraction is the concept of making code


easier to understand and reuse. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

5. In Alice, a person object inherits its procedures, functions, and


properties from which of the following classes? Mark for Review
(1) Points

(Choose all correct answers)


Object subclass

Biped class (*)

Quadruped class

Person subclass (*)

[Correct] Correct

6. The Alice gallery is a collection of 2D models that can be inserted into the
scene. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

7. From your Alice lessons, how can you locate objects in the Alice
gallery? Mark for Review
(1) Points

(Choose all correct answers)

Look on your computer network.

Browse through the folders of classes. (*)

Import objects.

Search for objects by keyword. (*)

[Correct] Correct

8. Which of the following are steps to use "drag-and-drop"


positioning to position an Alice object in a scene? Mark for Review
(1) Points
Select the object with your cursor.

Using your cursor, position the object in the scene.

Select a handle style.

All of the above (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

9. 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
(1) Points

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}

[Correct] Correct

10. How do you copy an Alice procedure? Mark for Review


(1) Points

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.

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.


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

playSound

playAudio (*)

playSoundFile

playFile

[Correct] Correct

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

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

True (*)

False

[Correct] Correct

14. 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
(1) Points

True
False (*)

[Correct] Correct

15. From your Alice lessons, what can be used as a guideline to


ensure your animation fulfills animation principles? Mark for Review
(1) Points

The Internet

Animation checklist (*)

A close friend

None of the above

[Correct] Correct

16. A flowchart shows what happens in an Alice animation if an action takes


place, or does not take place. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

17. Which of the following does not describe methods? Mark for
Review
(1) Points

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. (*)


[Correct] Correct

18. In Java, a function is a method that returns a value. True or


false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

19. Do In Order and Do Together are the only control statements


available in Alice. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

20. In Alice, once procedures are added to a control statement, they


cannot be changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

21. In Alice, functions are dragged into the control statement, not the
procedure. True or false? Mark for Review
(1) Points

True
False (*)

[Correct] Correct

22. In Alice, which function is used to move an object directly to


the center point of another object? Mark for Review
(1) Points

getObject

getDuration

getDepth

getDistance (*)

[Correct] Correct

23. A conditional loop is a loop that will continue forever. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

24. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

25. In Alice, we use the While control statement to implement the


conditional loop. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

True

False (*)

[Correct] Correct

27. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

28. What type of parameter does the Greenfoot playSound method


expect? Mark for Review
(1) Points
name of a sound file (as String) (*)

name of an integer (as int)

name of a keyboard key (as String)

name of the class (as String)

[Correct] Correct

29. In Greenfoot, what type of parameter does the keyDown method


expect? Mark for Review
(1) Points

String (*)

Boolean

Integer

Method

[Correct] Correct

30. In the Greenfoot IDE, what symbols indicate that the variable is
an array? Mark for Review
(1) Points

Square brackets [ ] (*)

Curly brackets { }

Semicolon ;

Colon :

[Correct] Correct

31. In Greenfoot, what type of symbol is used to connect boolean expressions?


Mark for Review
(1) Points

String concatenation

Logic operators (*)

Integers

Keyboard key names

[Correct] Correct

32. In Greenfoot, when is a local variable most often used? Mark


for Review
(1) Points

Within the scenario

Within the act method

Within the world constructor

Within loop constructs (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

33. In Greenfoot, constructors can be used to create new instances of


objects. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

34. 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")); Mark for Review
(1) Points

setImage

GreenfootImage

duke100.png (*)

new

[Incorrect] Incorrect. Refer to Section 3 Lesson 8.

35. From your Greenfoot lessons, where should the stop method be
inserted into the source code? Mark for Review
(1) Points

In the defined method.

In the act method. (*)

In the import statement.

In the class header.

[Correct] Correct

36. 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
(1) Points

True (*)

False

[Correct] Correct

37. In Greenfoot, a subclass is created by right-clicking on a


superclass. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

38. In Greenfoot, you must first create an instance before you create
a class. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

39. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points

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.

[Correct] Correct

40. 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) Points

True (*)
False

[Correct] Correct

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

True (*)

False

[Correct] Correct

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


identified? Mark for Review
(1) Points

Define the problem.

Design the solution.

Program the solution. (*)

Test the solution.

[Correct] Correct

43. From your Greenfoot lessons, which of the following is an example


of changing the environment during a Q/A test cycle? Mark for Review
(1) Points

Use a different operating system. (*)

Use the mouse instead of the keyboard.

Use symbols instead of numbers.


All of the above.

[Incorrect] Incorrect. Refer to Section 3 Lesson 12.

44. From your Greenfoot lessons, in an if-statement, the programming


statements written in curly brackets are executed simultaneously. True or false?
Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 3.

45. From your Greenfoot lessons, which axes define an object's


position in a world? Mark for Review
(1) Points

(Choose all correct answers)

x (*)

y (*)

[Correct] Correct

46. When a Greenfoot code segment is executed in an if-statement, each line of


code is executed in sequential order. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct
47. 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

True

False (*)

[Correct] Correct

48. What type of Greenfoot method would be used to turn an object?


Mark for Review
(1) Points

orientTo( );

turnAround( );

move ( );

turn( ); (*)

[Correct] Correct

49. 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) Points

True (*)

False

[Correct] Correct

50. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points
In the computer network

In the Greenfoot image gallery

In the scene editor

In the documentation (*)

[Correct] Correct

1. The Alice If control structure requires the false statement to be


populated. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

2. In Alice, we use the While control statement to implement the


conditional loop. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

3. A loop can be infinite (continue forever) or conditional (stops


upon a condition). True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct
4. From your Alice lessons, you can run the animation to test that
it works properly. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

5. 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) Points

True (*)

False

[Correct] Correct

6. From your Alice lessons, animations should be tested by the programmer before
they are considered complete. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

True (*)

False
[Correct] Correct

8. Which Alice control statement executes a set of procedures in


order? Mark for Review
(1) Points

Do in order (*)

Do together

If

For each in

Variable

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

9. The amount that an Alice object moves is in what metric? Mark


for Review
(1) Points

Feet

Centimeters

Meters (*)

Millimeters

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

10. In Alice, inheritance means that the superclass inherits its


traits from the subclass. True or false? Mark for Review
(1) Points

True

False (*)
[Correct] Correct

11. In Alice, a person object inherits its procedures, functions, and properties
from which of the following classes? Mark for Review
(1) Points

(Choose all correct answers)

Object subclass

Biped class (*)

Quadruped class

Person subclass (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

12. In Alice, objects inherit the characteristics of their: Mark


for Review
(1) Points

Code

Project

Class (*)

Program

[Correct] Correct

13. Alice uses built-in math operators; they are: Mark for Review
(1) Points

Add and subtract

Multiply and divide


All of the above (*)

None of the above

[Correct] Correct

14. In Alice, where are arithmetic operators available? Mark for


Review
(1) Points

(Choose all correct answers)

Amount argument (*)

Size argument

Duration argument (*)

Get Distance functions (*)

If control

[Incorrect] Incorrect. Refer to Section 2 Lesson 9.

15. Results of arithmetic operations cannot be stored in a variable.


True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

16. 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
(1) Points

while loop

if (*)
array

boolean

[Correct] Correct

17. You have a Class representing Cat. Each Cat can meow, purr, catch
mice, and so on. When you create a new cat, what is it called? Mark for Review
(1) Points

A submethod

A subprogram

An instance (*)

A subclass

A variable class

[Correct] Correct

18. From your Alice lessons, once you select an instance, you will
add a class to the scene. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 2.

19. Which of the following is a procedure to precisely position an


Alice object? Mark for Review
(1) Points

Move
Turn

Roll

MoveToward

All of the above (*)

[Correct] Correct

20. From your Alice lessons, it is valuable to save a version of your


Alice animation scene after objects have been repositioned. True or false? Mark
for Review
(1) Points

True (*)

False

[Correct] Correct

21. From your Alice lessons, if you examined a science process that had many
steps, which of the following is a way that you could apply functional
decomposition to this process? Mark for Review
(1) Points

1. Present the problem as an animation.


2. Further refine and define the tasks needed for each high level step.
3. Identify the high level steps for the science concept.

1. Identify the detailed steps for the science concept.


2. Present the problem as an animation.

Present the problem as an animation.

1. Identify the high level steps for the science concept.


2. Further refine and define the tasks needed for each high level step.
3. Present the problem as an animation. (*)

[Correct] Correct
22. An Alice object can move in four directions. True or false?
Mark for Review
(1) Points

True

False (*)

[Correct] Correct

23. Which of the following are examples of comments written in an


Alice program? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

24. Do In Order and Do Together are the only control statements


available in Alice. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

25. In Alice, which function is used to move an object directly to


the center point of another object? Mark for Review
(1) Points

getObject
getDuration

getDepth

getDistance (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 5.

26. From your Greenfoot lessons, which of the following are examples of
abstraction? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

27. Use your Greenfoot knowldege: Abstraction occurs in many


different ways in programming. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

28. Which method is used to play sound in your Greenfoot game? Mark
for Review
(1) Points
getSound method

findSound method

playSound method (*)

importSound method

[Correct] Correct

29. In Greenfoot, which method checks if a key on the keyboard has


been pressed? Mark for Review
(1) Points

keyPress method

keyUp method

keyDown method (*)

keyClick method

[Correct] Correct

30. Read the following method signature. Using your Greenfoot


experience, what does this method do?

public static int getRandomNumber (int limit) Mark for Review


(1) Points

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.

[Correct] Correct
31. 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

True (*)

False

[Correct] Correct

32. In Greenfoot, you can use comparison operators to compare a


variable to a random number. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

33. In Greenfoot, which of the following are execution controls?


Mark for Review
(1) Points

(Choose all correct answers)

Run (*)

Act (*)

Speed (*)

Move

Turn

[Correct] Correct

34. From your Greenfoot lessons, to create a new instance of the Duke
class, you right-click on the class, then select which of the following commands in
the class menu? Mark for Review
(1) Points

New subclass...

Set image...

new Duke() (*)

Inspect

Remove

[Incorrect] Incorrect. Refer to Section 3 Lesson 1.

35. In Greenfoot, objects are created from: Mark for Review


(1) Points

Methods

Classes (*)

Signatures

Parameters

[Correct] Correct

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

Use a different operating system.

Use the mouse instead of the keyboard.

Use symbols instead of numbers. (*)

All of the above.


[Correct] Correct

37. In Greenfoot, a method with what kind of return type is used to


learn more about an object's orientation? Mark for Review
(1) Points

non-void return type (*)

void return type

object return type

method return type

[Incorrect] Incorrect. Refer to Section 3 Lesson 3.

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

True (*)

False

[Correct] Correct

39. From your Greenfoot lessons, to save space in the act method, you
can write an entirely new method below it, called a _____________. Mark for
Review
(1) Points

Class method

Instance method

Defined method (*)

World method
Code method

[Correct] Correct

40. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

41. From your Greenfoot lessons, where should the stop method be inserted into
the source code? Mark for Review
(1) Points

In the defined method.

In the act method. (*)

In the import statement.

In the class header.

[Correct] Correct

42. 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) Points

True (*)

False

[Correct] Correct
43. In Greenfoot, which method is used to add a new instance to a
scenario when the world is initialized? Mark for Review
(1) Points

addClass

addWorld

addObject (*)

addInstance

[Correct] Correct

44. 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) Points

True

False (*)

[Correct] Correct

45. In the following Greenfoot method signature, which is the method


name?

void turnLeft() Mark for Review


(1) Points

()

void

turnLeft (*)

Left

[Correct] Correct
46. In the Greenfoot IDE, which of the following is not a property of an
instance? Mark for Review
(1) Points

Position

Inherited methods

Scenario name (*)

Defined methods

[Correct] Correct

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


Mark for Review
(1) Points

orientTo( );

turnAround( );

move ( );

turn( ); (*)

[Correct] Correct

48. 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? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

49. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points

A statement that executes one segment of code.

A statement that can execute a section of code multiple times. (*)

A statement that can execute a section of code one time.

A statement that can execute a method multiple times.

[Correct] Correct

50. In a Greenfoot loop constructor, which component is a counter


that controls how many times the statement is executed? Mark for Review
(1) Points

Local loop

While loop

Loop variable (*)

Condition

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

1. The Alice If control structure requires the false statement to be populated.


True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 6.

2. What Alice tool can be used to diagram the If conditional


execution statement? Mark for Review
(1) Points

Cause and effect diagram

Process flow diagram (*)

Conditional flow diagram

[Correct] Correct

3. In Alice, we use the While control statement to implement the


conditional loop. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

4. In Alice, if a procedure is declared for MyClownFish, which


classes can use the procedure? Mark for Review
(1) Points

MyClownFish class and MySwimmer class

MyClownFish class (*)

MyPajamaFish class, MyClownFish class, and MySwimmer class

Any class with "Fish" in the class name

[Correct] Correct

5. In Alice, new procedures that are declared for an instance appear


in the procedures tab in the methods panel. True or false? Mark for Review
(1) Points

True (*)
False

[Correct] Correct

6. 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
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

7. All objects in Alice have three dimensional coordinates on which


axes? Mark for Review
(1) Points

(Choose all correct answers)

x (*)

y (*)

z (*)

All of the above


[Correct] Correct

8. The Alice gallery is a collection of 2D models that can be


inserted into the scene. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

9. Which of the following is a procedure to precisely position an


Alice object? Mark for Review
(1) Points

Move

Turn

Roll

MoveToward

All of the above (*)

[Correct] Correct

10. From your Alice lessons, animations should be tested by the


programmer before they are considered complete. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

The Internet

Animation checklist (*)

A close friend

None of the above

[Correct] Correct

12. Define the value of the variable LapCount based on the following
math calculation: LapCount + 10 = 15 Mark for Review
(1) Points

5 (*)

15

10

[Correct] Correct

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


butterfly forward, double the distance to the tree? Mark for Review
(1) Points

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

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}

this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}


[Correct] Correct

14. From your Alice lessons, which of the following is a tool to show
the logic of an animation? Mark for Review
(1) Points

Visual storyboard

Flowchart (*)

Pie chart

Scene editor

Class chart

[Incorrect] Incorrect. Refer to Section 2 Lesson 1.

15. If you need to repeat a group of Java statements many times,


which Java construct should you use? Mark for Review
(1) Points

(Choose all correct answers)

repeat...until

do while loop (*)

while loop (*)

if

[Correct] Correct

16. Java programs can be simple programs that run from the command line, or they
can have complex graphical user interfaces. True or false? Mark for Review
(1) Points

True (*)
False

[Correct] Correct

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


(1) Points

Are move statements

Are control statements (*)

Are complex statements

None of the above

[Correct] Correct

18. In Alice, once procedures are added to a control statement, they


cannot be changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

19. In Alice, the vehicle property will associate one object to


another. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

20. In Alice, which of the following arguments are available to


further refine an object's movements? Mark for Review
(1) Points

(Choose all correct answers)

Object

Distance (*)

Duration (*)

Delay

[Correct] Correct

21. The Alice code editor contains the tools you need to set up the
background template and objects in the scene. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

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

this.blueTang roll Left 1.0 (*)

this.blueTang Left 1.0

this.blueTang Left 1

this.blueTang roll Left 1

[Correct] Correct

23. How do you copy an Alice procedure? Mark for Review


(1) Points

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.

[Correct] Correct

24. If the value already exists in the variable it is overwritten by


the assignment operator (=). True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

25. What is the output produced by the following code?

Mark for Review


(1) Points

j is 5
k is 5 (*)

j is 10
j is 5
k is 5

j is 10
k is 10

j is 15
k is 15
[Incorrect] Incorrect. Refer to Section 2 Lesson 9.

26. From your Greenfoot lessons, which of the following is an example of a type
of data passed through a parameter? Mark for Review
(1) Points

Methods

Classes

Integers (*)

Scenarios

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

27. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points

In the computer network

In the Greenfoot image gallery

In the scene editor

In the documentation (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

28. In Greenfoot, instances inherit the characteristics of the


subclass they belong to, but not the superclass. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
29. Using the Greenfoot IDE, which of the following programming
statements tells the object to turn 38 degrees? Mark for Review
(1) Points

move():

move(2);

turn(38); (*)

turn(38):

[Correct] Correct

30. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

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

True

False (*)
[Correct] Correct

32. In Greenfoot, what type of parameter does the keyDown method


expect? Mark for Review
(1) Points

String (*)

Boolean

Integer

Method

[Correct] Correct

33. What type of parameter does the Greenfoot playSound method


expect? Mark for Review
(1) Points

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

name of an integer (as int)

name of a keyboard key (as String)

name of the class (as String)

[Correct] Correct

34. 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) Points

True

False (*)
[Correct] Correct

35. Which class holds the method that ends a Greenfoot game? Mark
for Review
(1) Points

Greenfoot (*)

Class

GreenfootImage

Actor

36. Using Greenfoot, how do we change the size and resolution of the
World instance? Mark for Review
(1) Points

Edit the methods in the class.

Edit the values in the constructor. (*)

Delete the instance.

Edit the values in the class's act method.

[Correct] Correct

37. From your Greenfoot lessons, which of the following is an example


of changing the environment during a Q/A test cycle? Mark for Review
(1) Points

Use a different operating system. (*)

Use the mouse instead of the keyboard.

Use symbols instead of numbers.

All of the above.


[Correct] Correct

38. Programming tasks to create a Greenfoot game typically occur in


the following order:

1.Define the problem.


2.Design the solution.
3.Program the solution.
4.Test the solution.

True or false? Mark for Review


(1) Points

True (*)

False

[Correct] Correct

39. In Greenfoot, a subclass is created by right-clicking on a


superclass. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

40. From your Greenfoot lessons, to create a new instance of the Duke
class, you right-click on the class, then select which of the following commands in
the class menu? Mark for Review
(1) Points

New subclass...

Set image...

new Duke() (*)

Inspect
Remove

[Correct] Correct

41. To execute a method in your Greenfoot game, where is it called from? Mark
for Review
(1) Points

The world

The act method (*)

The actor class

The gallery

[Correct] Correct

42. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

43. 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) Points

True (*)

False
[Correct] Correct

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


that controls how many times the statement is executed? Mark for Review
(1) Points

Local loop

While loop

Loop variable (*)

Condition

[Correct] Correct

45. 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? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

46. In Greenfoot, what type of symbol is used to connect boolean expressions?


Mark for Review
(1) Points

String concatenation

Logic operators (*)

Integers

Keyboard key names

[Correct] Correct
47. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points

(Choose all correct answers)

Galleries

Classes (*)

Scenarios

Objects (*)

All of the above

[Incorrect] Incorrect. Refer to Section 3 Lesson 5.

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


operators represents "greater than"? Mark for Review
(1) Points

> (*)

<

= =

! =

[Correct] Correct

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

True

False (*)
[Correct] Correct

50. From your Greenfoot lessons, what are the ways that you can view
a class's methods? Mark for Review
(1) Points

(Choose all correct answers)

In the scenario

In the class's documentation (*)

By right-clicking on an instance (*)

In the Greenfoot gallery

[Correct] Correct

1. An Alice event is considered what? Mark for Review


(1) Points

A party with at least 20 people.

An object's orientation.

Error handling.

A keystroke or mouse click. (*)

[Correct] Correct

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


classes can use the procedure? Mark for Review
(1) Points

The clownFish class and Swimmer class

ClownFish class (*)


The pajamaFish class, clownFish class, and Swimmer class

Any class with "Fish" in the class name

[Correct] Correct

3. Before you can begin to develop the animation storyboard, what


must be defined? Mark for Review
(1) Points

The code

The debugging process

The scenario (*)

The control statements

[Correct] Correct

4. From your Alice lessons, which of the following is a tool to show


the logic of an animation? Mark for Review
(1) Points

Visual storyboard

Flowchart (*)

Pie chart

Scene editor

Class chart

[Correct] Correct

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


cat backward, half the distance to the bird? Mark for Review
(1) Points
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} (*)

[Correct] Correct

6. 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
(1) Points

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}

[Correct] Correct

7. Which of the following statements about what happens when the


following code is executed is false?

Mark for Review


(1) Points

The message "Printing Some Text" will be printed until loopVal is no longer
less than 5.

The variable loopVal is initialized to 0.

The condition loopVal < 5 is tested after the block is executed. (*)

The condition loopVal < 5 returns a boolean value.


None of the above.

[Incorrect] Incorrect. Refer to Section 2 Lesson 14.

8. You have a Class representing Cat. Each Cat can meow, purr, catch
mice, and so on. When you create a new cat, what is it called? Mark for Review
(1) Points

A submethod

A subprogram

An instance (*)

A subclass

A variable class

[Correct] Correct

9. A conditional loop is a loop that will continue forever. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

10. From your Alice lessons, which of the following are reasons why
random numbers would be used by a computer? Mark for Review
(1) Points

(Choose all correct answers)

For opening a project.

For security. (*)


For simulation. (*)

For creating procedures.

[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

11. From your Alice lessons, what is a one-shot procedural method? Mark for
Review
(1) Points

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.

[Correct] Correct

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

Mark for Review


(1) Points

(Choose all correct answers)

args

n (*)

i (*)

[Correct] Correct

13. Which of the following does not describe variables? Mark for
Review
(1) Points

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

Has a unique name.

Has a type associated with it.

Arranged in rows and columns. (*)

[Correct] Correct

14. What is the first step to programming an object to turn left in


Alice? Mark for Review
(1) Points

Select the duration for the object to turn.

Select the distance to turn.

Select the object to program from the instance menu. (*)

Drag the turn procedure into the Code editor.

[Incorrect] Incorrect. Refer to Section 2 Lesson 3.

15. From your Alice lessons, built-in functions provide precise


property details for the following areas: Mark for Review
(1) Points

Proximity and size.

Distance to and nesting.

Proximity, size, spatial relation, and point of view. (*)

Proximity and point of view.


[Correct] Correct

16. Which of the following actions would require a control statement to control
animation timing? Mark for Review
(1) Points

(Choose all correct answers)

A biped object walking. (*)

A rock object turning.

A fish swimming. (*)

A bird flying. (*)

[Correct] Correct

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


(1) Points

Are move statements

Are control statements (*)

Are complex statements

None of the above

[Correct] Correct

18. In Alice, a computer program requires functions to tell it how to


perform the procedure. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
19. Which of the following is not an Alice variable value type?
Mark for Review
(1) Points

Color

Decimal Number

Whole Number

Function (*)

[Correct] Correct

20. Which of the following programming instructions commands the fish


to continuously move forward a random speed between 0.5 and 1.0 meters, minus 0.25
meters, until it collides with the shark? Mark for Review
(1) Points

(*)A

[Correct] Correct

21. From your Alice lessons, animations should be tested by the programmer before
they are considered complete. True or false? Mark for Review
(1) Points

True (*)
False

[Correct] Correct

22. From your Alice lessons, functional decomposition is the process


of taking a complex problem or process and growing it into larger parts that are
easier to manage. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

Section 3
(Answer all questions in this section)

23. Which method is used to play sound in your Greenfoot game? Mark
for Review
(1) Points

getSound method

findSound method

playSound method (*)

importSound method

[Correct] Correct

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


called a __________________. Mark for Review
(1) Points

Subclass

Class
Signature (*)

Parameter

[Correct] Correct

25. In Greenfoot, you may perform the programming tasks of create and
test many times. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

26. Use your Greenfoot skills to answer the question. What is incorrect in this
code?

Mark for Review


(1) Points

Spacing missing

Curly brace missing

Parenthesis missing (*)

Comma missing

[Correct] Correct

27. In the Greenfoot IDE, which of the following is not a property of


an instance? Mark for Review
(1) Points

Position

Inherited methods
Scenario name (*)

Defined methods

[Correct] Correct

28. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points

In the computer network

In the Greenfoot image gallery

In the Scene editor

In the documentation (*)

[Correct] Correct

29. From your Greenfoot lessons, which of the following is an example


of a type of data passed through a parameter? Mark for Review
(1) Points

Methods

Classes

Integers (*)

Scenarios

[Correct] Correct

30. In Greenfoot, the properties of an instance can be modified in


the documentation. True or false? Mark for Review
(1) Points

True
False (*)

[Correct] Correct

31. From your Greenfoot lessons, which of the following are examples of
abstraction? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

32. 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) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 6.

33. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points

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.

[Correct] Correct

34. From your Greenfoot lessons, what are the ways that you can view
a class's methods? Mark for Review
(1) Points

(Choose all correct answers)

In the scenario

In the class's documentation (*)

By right-clicking on an instance (*)

In the Greenfoot gallery

[Correct] Correct

35. From your Greenfoot lessons, where do you review a class's


inherited methods? Mark for Review
(1) Points

Act method

Documentation (*)

Inspector

If-statement

[Correct] Correct

36. 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
(1) Points

True (*)

False

[Correct] Correct

37. Using the Greenfoot IDE, which of the following programming


statements tells the object to turn 38 degrees? Mark for Review
(1) Points

move():

move(2);

turn(38); (*)

turn(38):

[Correct] Correct

38. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points

A statement that executes one segment of code.

A statement that can execute a section of code multiple times. (*)

A statement that can execute a section of code one time.

A statement that can execute a method multiple times.

[Correct] Correct

39. In Greenfoot, a local variable is declared at the beginning of a


class. True or false? Mark for Review
(1) Points
True

False (*)

[Correct] Correct

40. How would the following sentence be written in Greenfoot source


code? If Duke's leg is down, and the keyboard key "d" is down... Mark for
Review
(1) Points

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

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

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

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

[Correct] Correct

41. In Greenfoot, what type of symbol is used to connect boolean expressions?


Mark for Review
(1) Points

String concatenation

Logic operators (*)

Integers

Keyboard key names

[Correct] Correct

42. Greenfoot Actor instances get their images from which of the
following? Mark for Review
(1) Points

Their class (*)


Their source code

Their image editor

Their methods

[Correct] Correct

43. In Greenfoot, constructors can be used to create new instances of


objects. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

44. 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) Points

True

False (*)

[Correct] Correct

45. In Greenfoot, a subclass is a specialization of a superclass.


True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct
46. Which of the following demonstrates a Greenfoot subclass/superclass
relationship? Mark for Review
(1) Points

A dog is a subclass of the cat superclass.

A rose is a subclass of the flower superclass. (*)

A computer is a subclass of a video game superclass.

A single person is a superclass of the human subclass.

[Correct] Correct

47. From your Greenfoot lessons, which axes define an object's


position in a world? Mark for Review
(1) Points

(Choose all correct answers)

x (*)

y (*)

[Correct] Correct

48. When a Greenfoot code segment is executed in an if-statement,


each line of code is executed in sequential order. True or false? Mark for
Review
(1) Points

True (*)

False

[Correct] Correct
49. In Greenfoot, you can use comparison operators to compare a
variable to a random number. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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


operators represents "greater than"? Mark for Review
(1) Points

> (*)

<

= =

! =

[Correct] Correct

1. What is the result when the following code segment is compiled and executed?

int x = 22, y = 10;


double p = Math.sqrt( ( x + y ) /2);
System.out.println(p); Mark for Review
(1) Points

Syntax error "sqrt(double) in java.lang.Math cannot be applied to int"

4.0 is displayed (*)

2.2 is displayed

5.656854249492381 is displayed

ClassCastException
[Incorrect] Incorrect. Refer to Section 4 Lesson 3.

2. Which of the following is the name of a Java primitive data type?


Mark for Review
(1) Points

Object

Rectangle

double (*)

String

[Correct] Correct

3. What symbols are required for a compiler to ignore a comment?


Mark for Review
(1) Points

// (*)

/*

*/

/*/

[Correct] Correct

4. For every opening curly brace { there does not need to be a


closing curly brace} for the program to compile without error. True or False?
Mark for Review
(1) Points

True

False (*)
[Correct] Correct

5. When you open more than one file in Eclipse the system will
__________________. Mark for Review
(1) Points

Close the previously opened file.

Use tabs to display all files open. (*)

Put the new file opened in a View area only.

None of the above.

[Correct] Correct

6. In Eclipse, when you run a Java Application, the results are displayed in a
new window. True or False? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 4 Lesson 1.

7. Four variables are required to support a conversion of one unit


of measure to another unit of measure. True or False? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 4 Lesson 1.

8. Which of the following defines a driver class? Mark for Review


(1) Points

Contains a main method and other static methods. (*)


Contains classes that define objects.

Contains a main method, a package, static methods, and classes that define
objects.

None of the above.

[Correct] Correct

9. The following defines an import keyword: Mark for Review


(1) Points

Defines where this class lives relative to other classes, and provides a
level of access control.

Provides the compiler information that identifies outside classes used within
the current class. (*)

Precedes the name of the class.

[Correct] Correct

10. Consider the following code snippet

String forest = new String("Black");


System.out.println(forest.length());

What is printed? Mark for Review


(1) Points

5 (*)

Black

Forest
[Correct] Correct

11. What is printed by the following code segment?

Mark for Review


(1) Points

alligator (*)

albatross alligator

albatross

a1

[Correct] Correct

12. Consider the following code snippet.

What is printed? Mark for Review


(1) Points

1 (*)

11

12

[Incorrect] Incorrect. Refer to Section 4 Lesson 4.

13. What will the following code segment output?

String s="\\\n\"\n\\\n\"";
System.out.println(s);
Mark for Review
(1) Points
\" \"

""\
""
\
""

\
"
\
" (*)

"
\
"
\
"
"

[Correct] Correct

14. Suppose that str1 and str2 are two strings. Which of the
statements or expressions are valid? Mark for Review
(1) Points

String str3 = str1 - str2;

str1 += str2; (*)

str1 >= str2

Str1 -= str2;

[Incorrect] Incorrect. Refer to Section 4 Lesson 4.

Section 5
(Answer all questions in this section)

15. Which of the following are relational operators in Java? Mark


for Review
(1) Points

(Choose all correct answers)


< (*)

<= (*)

!= (*)

All of the above.

[Incorrect] Incorrect. Refer to Section 5 Lesson 1.

16. The three logic operators in Java are: Mark for Review
(1) Points

&&, ||, ! (*)

!=,=,==

&&,!=,=

&,|,=

[Correct] Correct

17. In an if-else construct the condition to be evaluated must end


with a semi-colon. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

18. What is the output of the following code segment?

int num = 7;
while(num >= 0)
{
num -= 3;
}
System.out.println(num); Mark for Review
(1) Points

-2 (*)

[Correct] Correct

19. In the code fragment below, the syntax for the for loop's
initialization is correct. True or false?

public class ForLoop {


public static void main (String args[])
{
for ((int 1=10) (i<20) (i++))<br> {System.out.Println ("i: "+i); }
}
}

Mark for Review


(1) Points

True

False (*)

[Correct] Correct

20. How many times will the following loop be executed?


What is the value of x after the loop has finished?
What is the value of count after the loop has finished?

int count = 17;


int x = 1;
while(count > x){
x*=3;
count-=3;
} Mark for Review
(1) Points
4; 8; 27

3; 27; 8 (*)

5; 27; 8

5; 30; 5

3; 9; 11

[Incorrect] Incorrect. Refer to Section 5 Lesson 2.

21. Which of the following declares and initializes a one dimensional array named
words of size 3 so that all entries can be Strings? Mark for Review
(1) Points

String strings=new String[3];

String[] word={"Over","the","mountain"}; (*)

String[] word=new String[3];

String[] words={"Oracle","Academy"}];

[Incorrect] Incorrect. Refer to Section 6 Lesson 1.

22. The following segment of code prints all five of the command line
arguments entered into this program. True or false?

Mark for Review


(1) Points

True

False (*)

[Correct] Correct

23. What is the output of the following segment of code if the


command line arguments are "a b c d e f g"?

Mark for Review


(1) Points

e (*)

This code doesn't compile.

[Incorrect] Incorrect. Refer to Section 6 Lesson 1.

24. What is the output of the following segment of code if the


command line arguments are "a b c d e f"?

Mark for Review


(1) Points

6 (*)

This code doesn't compile.

[Correct] Correct

25. If an exception has already been thrown, what will the


interpreter read next in the program? Mark for Review
(1) Points

The next line of the program even if it is not the catch block of code.
Where the program catches the exception. (*)

The end of the program.

The user input.

[Incorrect] Incorrect. Refer to Section 6 Lesson 3.

26. Selection sort is efficient for large arrays. True or false? Mark for
Review
(1) Points

True

False (*)

[Correct] Correct

27. Which of the following sorting algorithms utilizes a "divide and


conquer" technique to sort arrays with optimal speed? Mark for Review
(1) Points

Sequential Search

Merge Sort (*)

Selection Sort

Binary Search

All of the above

[Correct] Correct

28. Which of the following best describes lexicographical order?


Mark for Review
(1) Points

A simple sorting algorithm that is inefficient on large arrays.


An order based on the ASCII value of characters. (*)

A complex sorting algorithm that is efficient on large arrays.

The order of indicies after an array has been sorted.

[Incorrect] Incorrect. Refer to Section 6 Lesson 2.

29. Big-O Notation is used in Computer Science to describe the


performance of Sorts and Searches on arrays. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

Section 7
(Answer all questions in this section)

30. Consider creating a class Square that extends the Rectangle class
provided below. Knowing that a square always has the same width and length, which
of the following best represents a constructor for the Square class?

Mark for Review


(1) Points

(*)
None of the above.

[Correct] Correct

31. What is encapsulation? Mark for Review


(1) Points

A keyword that allows or restricts access to data and methods.

A programming philosophy that promotes simpler, more efficient coding by


using exiting code for new applications.

A structure that categorizes and organizes relationships among ideas,


concepts of things with the most general at the top and the most specific at the
bottom.

A programming philosophy that promotes protecting data and hiding


implementation in order to preserve the integrity of data and methods. (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.

32. Which of the following show the correct UML representation of the
super class Planet and its subclass Earth? Mark for Review
(1) Points

(*)A

None of the above.

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.

33. What is the Java Applet? Mark for Review


(1) Points
(Choose all correct answers)

It is the virtual machine that translates Java code into a representation


that the computer can understand.

A web-based Java program that is embedded into a web browser. (*)

A graphic visual included in Java. (*)

There is no such thing as a Java Applet.

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.

34. Identify the driver class that correctly initializes employees


Jane and Brandon. The Employee class is below.

public class Employee {


private String name;
private int age;
private double salary;
public Employee(String n, int a, double s) {
name = n;
age = a;
salary = s;
}
//methods for this class would go here
} Mark for Review
(1) Points

public class driver_class {


public static void main(String[] args) {
Employee Jane = new Employee("Jane", 48, 35.00);
Employee Brandon = new Employee("Brandon", 36, 20.00);
}
} (*)

public class driver_class {


public static void main(String[] args) {
Employee("Jane", 48, 35.00);
Employee("Brandon", 36, 20.00);
}
}

public class driver_class {


public Employee{
Jane = new Employee("Jane", 48, 35.00);
Brandon = new Employee("Brandon", 36, 20.00);
}
}
public class Employee {
public class driver-class{
Employee Jane = new Employee();
Employee Brandon = new Employee();
}
}

[Incorrect] Incorrect. Refer to Section 7 Lesson 1.

35. Java's garbage collection is when all references to an object are


gone, the memory used by the object is automatically reclaimed. True or false?
Mark for Review
(1) Points

True (*)

False

[Correct] Correct

36. The basic unit of encapsulation in Java is the primitive data type. True or
false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

37. The constructor method must always have at least one parameter.
True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 1.


38. What is wrong with the following class declaration?

class Account{ ;
private int number;
private String name;;
public Account;
} Mark for Review
(1) Points

Classes cannot include strings.

Classes cannot include mixed data types.

The constructor method has no definition. (*)

There is nothing wrong.

[Incorrect] Incorrect. Refer to Section 7 Lesson 1.

39. The following code creates an object of type Animal. True or


false?

Animal a=new Animal(); Mark for Review


(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 7 Lesson 1.

40. If it is possible to inherit from an abstract class, what must


you do to prevent a compiler error from occurring? Mark for Review
(1) Points

(Choose all correct answers)

It is not possible to inherit from an abstract class.

Create all new methods and variables different from the parent class.

Override all abstract methods from the parent class. (*)


Declare the child class as abstract. (*)

[Correct] Correct

41. What is Polymorphism? Mark for Review


(1) Points

A way of redefining methods with the same return type and parameters.

A way to create multiple methods with the same name but different parameters.

A class that cannot be initiated.

The concept that a variable or reference can hold multiple types of objects.
(*)

[Correct] Correct

42. If Oak extends Tree, it is possible to declare an object such


that

Tree grandfatherT = new Oak();

True or false? Mark for Review


(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

43. Which of the following is the definition of a constructor? Mark


for Review
(1) Points

A keyword that specifies accessibility of code.

A special method that is used to assign initial values to instance variables


in a class. (*)

A way to call a method with a variable number of arguments using an elipse.


A variable in a method declaration that gets passed into the method.

[Correct] Correct

44. Which of the following is the definition for a variable argument


method? Mark for Review
(1) Points

A way to create a new class.

Specifies accessibility to code.

Having more than one constructor with the same name but different arguments.

A type of argument that enables calling the same method with a different
number of arguments. (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 2.

45. Which of the following can be used as a parameter? Mark for


Review
(1) Points

(Choose all correct answers)

Integers (*)

Strings (*)

Constructors

Arrays (*)

Objects (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 2.

46. Which segment of code represents a correct way to call a variable argument
method counter that takes in integers as its variable argument parameter? Mark
for Review
(1) Points

counter(String a, int b);

counter(int[] numbers);

counter(1, 5, 8, 17, 11000005); (*)

counter("one","two",String[] nums);

[Incorrect] Incorrect. Refer to Section 7 Lesson 2.

47. Which segment of code represents a correct way to define a


variable argument method? Mark for Review
(1) Points

String easyArray(String ... elems) {//code} (*)

String easyArray(... String elems) {//code}

String ... easyArray(String elems) {//code}

Integer easyArray ... (int elems) {//code}

[Incorrect] Incorrect. Refer to Section 7 Lesson 2.

48. Any instance of the same class can assign a new value to a static
variable. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 7 Lesson 3.

49. Static methods can write to instance variables. True or false?


Mark for Review
(1) Points
True

False (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 3.

50. Static classes can have different access specifiers than the
parent class. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 7 Lesson 3.

1. The following code is an example of instantiating a String object:

String str = String( "Hello" );

True or false? Mark for Review


(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 4 Lesson 4.

2. Given the code:

String s = new String("abc");

Which of the following statements will change the length of s to the largest
length? Mark for Review
(1) Points

s.trim()

s.replace("a", "aa")

s.substring(2)
s.toUpperCase()

None of the above will change the length of s. (*)

[Correct] Correct

3. What will the following code segment output?

String s="\\\n\"\n\\\n\"";
System.out.println(s);
Mark for Review
(1) Points

\" \"

""\
""
\
""

\
"
\
" (*)

"
\
"
\
"
"

[Incorrect] Incorrect. Refer to Section 4 Lesson 4.

4. What is printed by the following code segment?

Mark for Review


(1) Points

alligator (*)

albatross alligator
albatross

a1

[Incorrect] Incorrect. Refer to Section 4 Lesson 4.

5. Consider the following code snippet.

What is printed? Mark for Review


(1) Points

Cayrbniz

CayrbnizCayrbniz

yr (*)

ay

ArrayIndexOutofBoundsException is thrown

[Incorrect] Incorrect. Refer to Section 4 Lesson 4.

6. A workspace is: Mark for Review


(1) Points

The physical location onto which you will store and save your files.

The location where all projects are developed and modified.

The location where you can have one or more stored perspectives.

All of the above. (*)

[Correct] Correct

7. When converting gallons to liters its best to put the calculation


result into a variable with a _______________ data type. Mark for Review
(1) Points

int

double (*)

boolean

None of the above

[Incorrect] Incorrect. Refer to Section 4 Lesson 1.

8. A combination of views and editors are referred to as


_______________. Mark for Review
(1) Points

A workspace

A physical location

A perspective (*)

All of the above

[Incorrect] Incorrect. Refer to Section 4 Lesson 1.

9. A workspace can not have more than one stored projects. True or
false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

10. For every opening curly brace { there does not need to be a
closing curly brace} for the program to compile without error. True or False?
Mark for Review
(1) Points
True

False (*)

[Incorrect] Incorrect. Refer to Section 4 Lesson 1.

11. The following defines a package keyword: Mark for Review


(1) Points

Defines where this class lives relative to other classes, and provides a
level of access control. (*)

Provides the compiler information that identifies outside classes used within
the current class.

Precedes the name of the class.

[Incorrect] Incorrect. Refer to Section 4 Lesson 2.

12. When importing another package into a class you must import only
the package classes that will be called and not the entire package. True or false?
Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 4 Lesson 2.

13. Select the declaration and initialization statement that will


hold the letter J. Mark for Review
(1) Points

int letter='J';

float letter='J';

String letter='J';
char letter='J'; (*)

[Incorrect] Incorrect. Refer to Section 4 Lesson 3.

14. Select the statement that declares a number of type double and
initializes it to 6 times 10 to the 5th power. Mark for Review
(1) Points

double number=6*10^5;

double number=6e5; (*)

double number=6(e5);

double number=6*10e5;

[Incorrect] Incorrect. Refer to Section 4 Lesson 3.

Section 5
(Answer all questions in this section)

15. Which of the following expressions will evaluate to true when x


and y are boolean variables with opposite values?

I. (x || y) && !(x && y)


II. (x && !y) || (!x && y)
III. (x || y) && (!x ||!y) Mark for Review
(1) Points

I only

II only

I and III

II and III

I, II, and III (*)

[Incorrect] Incorrect. Refer to Section 5 Lesson 1.


16. The six relational operators in Java are: Mark for Review
(1) Points

>,<,=,!,<=,>=

>,<,==,!=,<=,>= (*)

>,<,=,!=,<=,>=

>,<,=,!=,=<,=>

[Incorrect] Incorrect. Refer to Section 5 Lesson 1.

17. Which of the following are relational operators in Java? Mark


for Review
(1) Points

(Choose all correct answers)

< (*)

<= (*)

!= (*)

All of the above.

[Incorrect] Incorrect. Refer to Section 5 Lesson 1.

18. In a for loop the counter is not automatically incremented after


each loop iteration. Code must be written to increment the counter. True or false?
Mark for Review
(1) Points

True (*)

False
[Incorrect] Incorrect. Refer to Section 5 Lesson 2.

19. Why are loops useful? Mark for Review


(1) Points

They save programmers from having to rewrite code.

They allow for repeating code a variable number of times.

They allow for repeating code until a certain argument is met.

All of the above. (*)

[Correct] Correct

20. A counter used in a for loop cannot be initialized within the For
loop header. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 5 Lesson 2.

21. If an exception is thrown by a method, where can the catch for the exception
be? Mark for Review
(1) Points

There does not need to be a catch in this situation.

The catch must be in the method that threw the exception.

The catch can be in the method that threw the exception or in any other
method that called the method that threw the exception. (*)

The catch must be immediately after the throw.

[Correct] Correct
22. What is the output of the following segment of code?

Mark for Review


(1) Points

321111

11 (*)

111

1111

This code doesn't compile.

[Incorrect] Incorrect. Refer to Section 6 Lesson 1.

23. What will array arr contain after the following code segment has
been executed?

int [] arr = {5, 4, 2, 1, 0};


for (int i = 1; i < arr.length; i++)<br> {
arr[i - 1] += arr[i];
} Mark for Review
(1) Points

9, 6, 1, 3, 0

10, 6, 3, 1, 0

9, 6, 3, 1, 0 (*)

7, 3, 2, 1, 0

None of the above.

[Incorrect] Incorrect. Refer to Section 6 Lesson 1.

24. The following array declaration is valid. True or false?

int[] y = new int[5]; Mark for Review


(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 6 Lesson 1.

25. What is the output of the following segment of code?

int array[][] = {{1,2,3},{3,2,1}};


for(int i=0;i<2;i++)
for(int j=0;j<3;j++)
System.out.print(2*array[1][1]); Mark for Review
(1) Points

444444 (*)

123321

246642

222222

This code doesn't compile.

[Incorrect] Incorrect. Refer to Section 6 Lesson 1.

26. Bubble Sort is a sorting algorithm that involves swapping the smallest value
into the first index, finding the next smallest value and swapping it into the next
index and so on until the array is sorted. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 6 Lesson 2.

27. Of the options below, what is the fastest run-time? Mark for
Review
(1) Points
n

n^2

lg(n) (*)

n*lg(n)

[Incorrect] Incorrect. Refer to Section 6 Lesson 2.

28. Which of the following best describes lexicographical order?


Mark for Review
(1) Points

A simple sorting algorithm that is inefficient on large arrays.

An order based on the ASCII value of characters. (*)

A complex sorting algorithm that is efficient on large arrays.

The order of indicies after an array has been sorted.

[Incorrect] Incorrect. Refer to Section 6 Lesson 2.

29. Selection sort is efficient for large arrays. True or false?


Mark for Review
(1) Points

True

False (*)

[Correct] Correct

Section 7
(Answer all questions in this section)

30. Identify the correct way to declare an abstract class. Mark


for Review
(1) Points

abstract public class ClassName{...}

public abstract ClassName(...)

public class abstract ClassName(...)

public abstract class ClassName{...} (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

31. Which of the following would be most beneficial for this scenario?

Joe is a college student who has a tendency to lose his books. Replacing them is
getting costly. In an attempt to get organized, Joe wants to create a program that
will store his textbooks in one group of books, but he wants to make each book type
the subject of the book (i.e. MathBook is a book). How could he store these
different subject books into a single array?

Mark for Review


(1) Points

By ignoring the subject type and initializing all the book as objects of type
Book.

By overriding the methods of Book.

Using polymorphism. (*)

This is not possible. Joe must find another way to collect the books.

[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

32. Identify the step(s) in creating a Triangle Applet that displays


two triangles. Mark for Review
(1) Points

(Choose all correct answers)

Extend Applet class to inherit all methods including paint. (*)

Override the paint method to include the triangles. (*)


Draw the triangle using the inherited fillPolygon method. (*)

Draw the 2nd triangle using the inherited fillPolygon method. (*)

Run and compile your code. (*)

None of the above.

[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

33. Which of the following show the correct UML representation of the
super class Planet and its subclass Earth? Mark for Review
(1) Points

(*)

None of the above.

[Correct] Correct

34. What is encapsulation? Mark for Review


(1) Points

A keyword that allows or restricts access to data and methods.

A programming philosophy that promotes simpler, more efficient coding by


using exiting code for new applications.

A structure that categorizes and organizes relationships among ideas,


concepts of things with the most general at the top and the most specific at the
bottom.
A programming philosophy that promotes protecting data and hiding
implementation in order to preserve the integrity of data and methods. (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.

35. What is the Java Applet? Mark for Review


(1) Points

(Choose all correct answers)

It is the virtual machine that translates Java code into a representation


that the computer can understand.

A web-based Java program that is embedded into a web browser. (*)

A graphic visual included in Java. (*)

There is no such thing as a Java Applet.

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.

36. Where should the constructor for a superclass be called? Mark for Review
(1) Points

Anywhere inside the subclass.

Inside the main method of the subclass.

The last line in the constructor of the subclass.

The first line of the constructor in the subclass. (*)

The super constructor does not need to be called inside the subclass.

[Correct] Correct

37. A final static variable can change at runtime. True or false?


Mark for Review
(1) Points

True
False (*)

[Correct] Correct

38. Static methods can write to instance variables. True or false?


Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 3.

39. Static classes can return instances of their parent class. True
or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

40. Which of the following is the correct definition of a parameter?


Mark for Review
(1) Points

A keyword that specifies accessibility of code.

A way to call a method with a variable number of arguments using an elipse.

A variable in a method declaration that gets passed into the method. (*)

A type of access specifier.

It is used to assign initial values to instance variables of a class; the


structure is very similar to that of a method.
[Incorrect] Incorrect. Refer to Section 7 Lesson 2.

41. Which of the following specifies accessibility to variables, methods, and


classes? Mark for Review
(1) Points

Methods

Parameters

Overload constructors

Access modifiers (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 2.

42. Which of the following could be a reason to return an object?


Mark for Review
(1) Points

Because you wish to be able to use that object inside of the method.

It has faster performance than returning a primitive type.

The method makes changes to the object and you wish to continue to use the
updated object outside of the method. (*)

None of the above. It is not possible to return an object.

[Correct] Correct

43. Which of the following can be used as a parameter? Mark for


Review
(1) Points

(Choose all correct answers)

Integers (*)

Strings (*)
Constructors

Arrays (*)

Objects (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 2.

44. Which of the following is the definition of a constructor? Mark


for Review
(1) Points

A keyword that specifies accessibility of code.

A special method that is used to assign initial values to instance variables


in a class. (*)

A way to call a method with a variable number of arguments using an elipse.

A variable in a method declaration that gets passed into the method.

[Incorrect] Incorrect. Refer to Section 7 Lesson 2.

45. Which of the following creates an object from the Animal class
listed below:

Mark for Review


(1) Points

Animal cat=new Animal();

Animal cat=Animal(50,30);

Animal cat=new Animal(50,30); (*)

Animal cat=new Animal(50);

[Incorrect] Incorrect. Refer to Section 7 Lesson 1.


46. Which of the following creates a method that returns a boolean value? Mark
for Review
(1) Points

(*)C

None of the above.

[Incorrect] Incorrect. Refer to Section 7 Lesson 1.

47. In Java, an instance field referenced using the this keyword


generates a compilation error. True or false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 1.

48. The constructor method must always have at least one parameter.
True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
49. A class always has a constructor. True or false? Mark for
Review
(1) Points

True (*)

False

[Correct] Correct

50. What operator do you use to call an object's constructor method


and create a new object? Mark for Review
(1) Points

new (*)

instanceOf

[Incorrect] Incorrect. Refer to Section 7 Lesson 1

1. The first step to using a top-down approach to programming is to create a


table to align the storyboard steps to the programming instructions. True or false?
Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

2. All objects in Alice have three dimensional coordinates on which


axes? Mark for Review
(1) Points

(Choose all correct answers)

x (*)

y (*)
z (*)

All of the above

[Correct] Correct

3. 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
(1) Points

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 (*)

[Incorrect] Incorrect. Refer to Section 2 Lesson 7.

4. From your Alice lessons, complete the following sentence: When


coded, an event triggers a ___________. Mark for Review
(1) Points

Infinite loop

Gallery

Procedure (*)

Scene
[Correct] Correct

5. A loop can be infinite (continue forever) or conditional (stops


upon a condition). True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct
6. 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
(1) Points

True

False (*)

[Correct] Correct

7. From your Alice lessons, animations should be tested by the


programmer before they are considered complete. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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


(1) Points

Are move statements

Are control statements (*)

Are complex statements


None of the above

[Correct] Correct

9. 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) Points

True (*)

False

[Correct] Correct

10. In Alice, the setVehicle procedure will associate one object to


another. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct
11. Expressions with relational operators produce true and false values. True or
false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

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

Mark for Review


(1) Points

(Choose all correct answers)


args

n (*)

i (*)

[Correct] Correct

13. From your Alice lessons, variables are fixed and cannot be
changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

14. 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) Points

True (*)

False

[Correct] Correct

15. In an Alice program, which code is executed when the Run button
is clicked? Mark for Review
(1) Points

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.

[Correct] Correct
16. You have a Class representing Cat. Each Cat can meow, purr, catch mice, and
so on. When you create a new cat, what is it called? Mark for Review
(1) Points

A submethod

A subprogram

An instance (*)

A subclass

A variable class

[Correct] Correct

17. In Java, a function is a method that returns a value. True or


false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

18. From your Alice lessons, a flowchart could be created in a


software program, or documented in a journal. True or false? Mark for Review
(1) Points

True (*)

False
[Correct] Correct

19. In Alice, procedural abstraction is the concept of making code


easier to understand and reuse. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

20. 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)

It makes the animation easier to run.

It makes the scene easier to view.

It simplifies code and makes it easier to read. (*)

It allows many objects of a class to use the same procedure. (*)

It can allow subclasses of a superclass to use a procedure. (*)

[Correct] Correct
21. In Alice, which of the following programming statements moves the butterfly
forward, double the distance to the tree? Mark for Review
(1) Points

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

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}

this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}

this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}


[Correct] Correct

22. In Alice, we can avoid object collision using what? Mark for
Review
(1) Points

Slowing movements down.

Using math operators. (*)

Downloading the Alice 3 collision detector app.

Using object detection.

[Correct] Correct

Section 3
(Answer all questions in this section)

23. What does the following Greenfoot programming statement do?

turn(18); Mark for Review


(1) Points

Turn the object 36 degrees.

Turn the object 18 degrees. (*)

Turn the object 18 steps forward.

Move the object 18 steps forward.

[Correct] Correct

24. From your Greenfoot lessons, instances do not have any memory.
True or false? Mark for Review
(1) Points

True
False (*)

[Correct] Correct

25. In Greenfoot, the properties of an instance can be modified in


the documentation. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct
26. 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

True

False (*)

[Correct] Correct

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

True (*)

False

[Correct] Correct

28. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points

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.

[Correct] Correct

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

True

False (*)

[Correct] Correct

30. From your Greenfoot lessons, in an if-statement, the programming


statements written in curly brackets are executed simultaneously. True or false?
Mark for Review
(1) Points

True

False (*)

[Correct] Correct
From your Greenfoot lessons, which of the following methods return the
current rotation of the object? Mark for Review
(1) Points

World getClass()

World getWorld()

int getRotation() (*)


getXY()

[Correct] Correct

32. In Greenfoot, which method checks if a key on the keyboard has


been pressed? Mark for Review
(1) Points

keyPress method

keyUp method

keyDown method (*)

keyClick method

[Correct] Correct

33. From your Greenfoot lessons, when does an if-else statement


execute it's second code segment? Mark for Review
(1) Points

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.

[Correct] Correct

34. 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
True

False (*)

[Correct] Correct

35. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points

(Choose all correct answers)

Galleries

Classes (*)

Scenarios

Objects (*)

All of the above

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

public static int getRandomNumber (int limit) Mark for Review


(1) Points

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.

[Correct] Correct

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


implemented in Greenfoot. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

38. From your Greenfoot lessons, which of the following is not a step
to creating a new subclass? Mark for Review
(1) Points

Right-click on a superclass.

Click New subclass...

Name the class.

Select an image for the class.

Program the class to move forward. (*)

[Correct] Correct

39. Use your Greenfoot knowledge to answer the question: Where are
defined variables typically entered in a class's source code? Mark for Review
(1) Points

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. (*)

[Correct] Correct

40. Which Greenfoot control operator is used to test if two values


are equal? Mark for Review
(1) Points

>= operator

== operator (*)

= operator

!= operator

[Correct] Correct
41. From your Greenfoot lessons, where should the stop method be inserted into
the source code? Mark for Review
(1) Points

In the defined method.

In the act method. (*)

In the import statement.

In the class header.

[Correct] Correct

42. In Greenfoot, which of the following statements could prevent an


infinite loop from occurring? Mark for Review
(1) Points

I = 100 + i

i=1

i = i

i = i + 1 (*)

[Correct] Correct
43. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points

A statement that executes one segment of code.

A statement that can execute a section of code multiple times. (*)

A statement that can execute a section of code one time.

A statement that can execute a method multiple times.

[Correct] Correct

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


that controls how many times the statement is executed? Mark for Review
(1) Points

Local loop

While loop

Loop variable (*)

Condition

[Correct] Correct

45. In the Greenfoot IDE, what symbols indicate that the variable is
an array? Mark for Review
(1) Points

Square brackets [ ] (*)

Curly brackets { }

Semicolon ;

Colon :
[Correct] Correct
46. From your Greenfoot lessons, how do you test that your code does not contain
bugs? Mark for Review
(1) Points

Write the code.

Inspect the instances.

Review the documentation.

Compile the code. (*)

[Correct] Correct

47. 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) Points

True

False (*)

[Correct] Correct

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

Use a different operating system.

Use the mouse instead of the keyboard.

Use symbols instead of numbers. (*)

All of the above.

[Correct] Correct
49. Use your Greenfoot skills to answer the question. What is
incorrect in this code?

Mark for Review


(1) Points

Spacing missing

Curly brace missing

Parenthesis missing (*)

Comma missing

[Correct] Correct

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

Mark for Review


(1) Points

Method

Comment

Constructor (*)

Class

[Incorrect] Incorrect. Refer to Section 3 Lesson 12.

1. Which of the following creates a class named Diver with one constructor, and
2 instance variables maxDepth and certified? Mark for Review
(1) Points

(*)
[Correct] Correct

2. The basic unit of encapsulation in Java is the: Mark for


Review
(1) Points

class (*)

classpath

method

package

[Correct] Correct

3. What is wrong with the following class declaration?

Mark for Review


(1) Points

Classes cannot include strings.

Classes cannot include mixed data types.

There is no constructor method and you have to make a constructor method.

There is nothing wrong. (*)

[Correct] Correct

4. Which of the following is true? Mark for Review


(1) Points

In Java, a method declared public generates a compilation error.


int is the name of a class available in the package java.lang.

Instance variable names may only contain letters and digits.

A class always has a constructor (possibly automatically supplied by the java


compiler). (*)

The more comments in a program, the faster the program runs.

[Correct] Correct

5. Which of the following may be part of a class definition? Mark


for Review
(1) Points

instance variables

instance methods

constructors

comments

all of the above (*)

[Correct] Correct

6. Which of the following creates a Object from the Animal class


listed below?

Mark for Review


(1) Points

Animal dog=new Animal();

Animal dog=new Animal(50,30); (*)

Animal dog=Animal(50,30);

Animal dog=new Animal(50);


[Correct] Correct

7. The following code creates an object of type Animal:


Animal a; Mark for Review
(1) Points

True

False (*)

[Correct] Correct

8. Which of the following creates an object from the Car class


listed below?

Mark for Review


(1) Points

Car c = new Car(3000, "Toyota"); (*)

Car c=new Car;

Car c=Car();

Car c;

Car c =new Car();

[Correct] Correct

9. The following statement compiles and executes. What can you say
for sure?
submarine.dive(depth); Mark for Review
(1) Points

The variable depth must be an int.

dive must be a method. (*)


dive must be the name of an instance field.

submarine must be the name of a class.

submarine must be a method.

[Correct] Correct

10. Which of the following creates a method that compiles with no


errors in the class? Mark for Review
(1) Points

(*)

All of the above.

None of the above.

[Correct] Correct

11. What value will be returned when the setValue method is called?

Mark for Review


(1) Points

35

36

37 (*)

38
[Correct] Correct

12. The return value of a method can only be a primitive type and not
an object. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

13. Which of the following calls the method moveUp in the class
below:

Mark for Review


(1) Points

Puzzle p=new Puzzle(); p.moveUp(3,4);

PuzzlePiece p=new PuzzlePiece(); p.moveUp(3,4); (*)

PuzzlePiece p=new PuzzlePiece(); p.moveUp(3,4,5);

Puzzle p=new Puzzle(); p.moveUp(3,4,5);

[Correct] Correct

14. A class can have multiple constructors. True or false? Mark


for Review
(1) Points

True (*)

False

[Correct] Correct

15. The constructor of a class has the same name as the class. True
or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

16. Complete the sentence. A constructor... Mark for Review


(1) Points

must have the same name as the class it is declared within.

is used to create objects.

may be declared public.

is all of the above. (*)

[Correct] Correct

17. What operator do you use to call an object's constructor method


and create a new object? Mark for Review
(1) Points

new (*)

class

instanceOf

[Correct] Correct

18. Consider:

public class MyClass{ public MyClass(){/*code*/} // more code...}

To instantiate MyClass, what would you write? Mark for Review


(1) Points
MyClass m = new MyClass(); (*)

MyClass m = new MyClass;

MyClass m = MyClass;

MyClass m = MyClass();

[Correct] Correct

19. What is garbage collection in the context of Java? Mark for


Review
(1) Points

The operating system periodically deletes all of the Java files available on
the system.

Any package imported in a program and not used is automatically deleted.

When all references to an object are gone, the memory used by the object is
automatically reclaimed. (*)

The JVM checks the output of any Java program and deletes anything that does
not make sense.

[Correct] Correct

20. Which of the following keywords are used to access the instance
variables of an object from within the class code for that object? Mark for
Review
(1) Points

public

private

protected

this (*)
[Correct] Correct

21. Which of the following adds a constructor to the class below?

Mark for Review


(1) Points

(*)

[Correct] Correct

22. Which constructor code populates the instance variables of the


class correctly? Mark for Review
(1) Points

(*)

[Correct] Correct

Page 1 of 1

1. Static variables can't use which of the following modifiers? Mark for
Review
(1) Points

Public

Protected
Friendly (*)

Default

Private

[Incorrect] Incorrect. Refer to Section 7 Lesson 3.

2. You can assign new values to static variables by prefacing them


with the this keyword and a dot or period. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

3. You can create static class methods inside any Java class. True
or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 7 Lesson 3.

4. Which of the following statements about static methods is true?


Mark for Review
(1) Points

They exist once per class. (*)

They exist once in each instance.

They can be overridden by a subclass.


They can access any instance variable.

They cannot access static variables declared outside the method.

[Incorrect] Incorrect. Refer to Section 7 Lesson 3.

5. You can return an instance of a private class through a static


method of a different class. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

6. You can create static classes as independent classes. True or


false? Mark for Review
(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 3.

7. You can use an inner static class to return an instance of its


outer class container. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

8. A linear recursive method can call how many copies of itself?


Mark for Review
(1) Points
1 (*)

2 or more

None

[Incorrect] Incorrect. Refer to Section 7 Lesson 3.

9. Which case does a recursive method call last? Mark for Review
(1) Points

Recursive Case

Convergence Case

Basic Case

Base Case (*)

None of the above

[Incorrect] Incorrect. Refer to Section 7 Lesson 3.

10. A non-linear recursive method can call how many copies of itself?
Mark for Review
(1) Points

2 or more (*)

None

[Incorrect] Incorrect. Refer to Section 7 Lesson 3.

11. A non-linear recursive method is less expensive than a linear


recursive method. True or false? Mark for Review
(1) Points
True

False (*)

[Correct] Correct

1. What does it mean to inherit a class? Mark for Review


(1) Points

The subclass (or child class) gains access to any non-private methods and
variables of the superclass (or parent class). (*)

The access specifier has been set to private.

A way of organizing the hierarchy of classes.

Extending a method from a superclass.

[Correct] Correct

2. Which is the most accurate description of the code reuse


philosophy? Mark for Review
(1) Points

A programming philosophy that promotes stealing your classmates' code.

A programming philosophy that promotes having no concern about the security


of code.

A programming philosophy that promotes protecting data and hiding


implementation in order to preserve the integrity of data and methods.

A programming philosophy that promotes simpler, more efficient coding by


using existing code for new applications. (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.

3. What is a UML? Mark for Review


(1) Points
Unidentified Molding Level, the level of access permitted by the default
access specifier.

Unified Modeling Language, a standardized language for modeling systems and


structures in programming. (*)

Universal Model Light, a program that reads the brightness of any given
lightbulb.

None of the above.

[Correct] Correct

4. What keyword is used to inherit a superclass? Mark for Review


(1) Points

new

public

extends (*)

this

[Correct] Correct

5. Which of the following correctly defines a superclass (or parent


class)? Mark for Review
(1) Points

A class that inherits methods and fields from a more general class.

The most specific class of a hierarchy system of classes.

A class that passes down its methods to more specialized classes. (*)

A keyword that allows or restricts access to data and methods.

[Correct] Correct
6. Which of the following correctly defines a subclass (or child
class)? Mark for Review
(1) Points

A class that inherits methods and fields from a more general class. (*)

A keyword that allows or restricts access to data and methods.

A class that passes down its methods to more specialized classes.

The most general class of a hierarchy system.

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.

7. Methods are generally declared as public so other classes may use


them. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

8. Which of the following correctly describes the use of the keyword


super? Mark for Review
(1) Points

A keyword that restricts access to only inside the same class.

A keyword that allows subclasses to access methods, data, and constructors


from their parent class. (*)

A keyword that signals the end of a program.

A keyword that allows access from anywhere.

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.


9. Which of the following is the proper way to set the public
variable length of the super class equal to 5 from inside the subclass? Mark
for Review
(1) Points

super.length() = 5

super.length(5)

super.length = 5 (*)

super(length = 5)

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.

10. What is a hierarchy? Mark for Review


(1) Points

A programming philosophy that promotes simpler, more efficient coding by


using existing code for new applications.

A programming philosophy that promotes protecting data and hiding


implementation in order to preserve the integrity of data and methods.

A keyword that allows subclasses to access methods, data, and constructors


from their parent class.

A structure that categorizes and organizes relationships among ideas and


concepts of things with the most general at the top and the most specific at the
bottom. (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.

11. Where should the constructor for a superclass be called? Mark


for Review
(1) Points

Anywhere inside the subclass.

Inside the main method of the subclass.

The last line in the constructor of the subclass.


The first line of the constructor in the subclass. (*)

The super constructor does not need to be called inside the subclass.

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.

12. It is possible to extend a class that already exists in Java,


such as the Applet class. True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.

13. Consider creating a class Square that extends the Rectangle class
provided below. Knowing that a square always has the same width and length, which
of the following best represents a constructor for the Square class?

Mark for Review


(1) Points

(*)

None of the above.

[Incorrect] Incorrect. Refer to Section 7 Lesson 4.


1. Why would a programmer use polymorphism rather than sticking to a standard
array? Mark for Review
(1) Points

Because arrays only work using the same object type and polymorphism provides
a way around this. (*)

Because it is easier to add or remove objects using polymorphism even when


all of the objects are of the same type.

Because arrays are more complex and polymorphism simplifies them by


restricting them to only contain the same type objects.

A programmer wouldn't use polymorphism over a standard array.

[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

2. If Sandal extends Shoe, it is possible to declare an object such


that

Sandal s = new Shoe(); Mark for Review


(1) Points

True

False (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

3. It is possible to override methods such as equals() and


toString() in a subclass of Object to fit the needs of the objects of the subclass.
True or false? Mark for Review
(1) Points

True (*)

False

[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

4. Is there a difference between overriding a method and overloading


a method? Mark for Review
(1) Points

Yes. Overriding is done within a single class and overloading is done through
a series of superclasses and their subclasses.

Yes. Overriding allows for the creation of an array of different object types
and overloading restricts an array to only contain the same object types.

Yes. Overriding is done in the subclass and allows for redefining a method
inherited from the superclass and overloading is done within a class and allows for
multiple methods with the same name. (*)

No, they are the same.

[Correct] Correct

5. What allows Java to correctly and automatically determine which


method to invoke based on the type of object being referred to at the time the
method is called? Mark for Review
(1) Points

Abstract classes

Polymorphism

Inheritance

Dynamic Method Dispatch (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

6. Which of the following are true about an abstract class? Mark


for Review
(1) Points

(Choose all correct answers)

It is possible to create objects of this type.

The Java Virtual Machine does not differentiate abstract classes from
concrete classes.
It is possible to create references of this type. (*)

It is identified by the Java keyword abstract. (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

7. If we override the toString() method with the code below, what


would be the result of printing?

Mark for Review


(1) Points

It would print the array one element at a time. The console screen would
display: 0 18 215 64 11 42

It would print the string returned from the method. The console screen would
display: [0,18,215,64,11,42,] (*)

It would print the array backwards. The console screen would display: 42 11
64 215 18 0

It would print the string returned from the method. The console screen would
display: {0, 18, 215, 64, 11, 42}

[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

8. What is the Java keyword final used for in a program? Mark


for Review
(1) Points

It restricts a class from being extendable and restricts methods from being
overridden. (*)

It permits access to the class variables and methods from anywhere.

It permits redefining methods of a parent class inside the child class, with
the same name, parameters, and return type.

It terminates the program.

There is no such keyword in Java.


[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

9. Which of the following is a goal of the object model? Mark


for Review
(1) Points

(Choose all correct answers)

Providing modular code that can be reused by other programs or classes. (*)

Concealing implementation. (*)

Data abstraction. (*)

Protecting information and limiting other classes' ability to change or


corrupt data. (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

10. Identify the step (s) in creating a Triangle Applet that displays
two triangles. Mark for Review
(1) Points

(Choose all correct answers)

Extend Applet class to inherit all methods including paint. (*)

Override the paint method to include the triangles. (*)

Draw the triangle using the inherited fillPolygon method. (*)

Draw the 2nd triangle using the inherited fillPolygon method. (*)

Run and compile your code. (*)

[Incorrect] Incorrect. Refer to Section 7 Lesson 5.

1. When Eclipse launches, the Welcome page displays. Once this page is closed
you cannot return to the resources available on this page. True or False? Mark
for Review
(1) Points
True

False (*)

Incorrect. Refer to Section 4 Lesson 1.

2. Eclipse provides an edit area to help you navigate a hierarchy of


information. True or False? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 4 Lesson 1.

3. Eclipse provides views to help you navigate a hierarchy of


information. True or False? Mark for Review
(1) Points

True (*)

False

Correct

4. Tabs are used when more than one file is open in the edit area.
True or False? Mark for Review
(1) Points

True (*)

False

Correct

5. A perspective is described as: Mark for Review


(1) Points

A combination of views and editors (*)


A combination of views and windows

A combination of editor tabs

None of the above

Incorrect. Refer to Section 4 Lesson 1.

6. The ______________ is the location into which you will store and
save your files. Mark for Review
(1) Points

Perspective

Workspace (*)

Editor

None of the above

Incorrect. Refer to Section 4 Lesson 1.

7. A workspace can have one or more stored projects. True or false?


Mark for Review
(1) Points

True (*)

False

Correct

8. Identify the components in the image below.

Mark for Review


(1) Points

A-Main Method, B-Class, C-Package

A-Class, B-MainMethod, C-Package

A-Package, B-Main Method, C-Class (*)


None of the above

Incorrect. Refer to Section 4 Lesson 1.

9. In Eclipse, when you run a Java Application, the results may be


displayed in the Console View. True or False? Mark for Review
(1) Points

True (*)

False

Correct

10. A _______________ is used to organize Java related files. Mark


for Review
(1) Points

Project

Workspace

Package (*)

Collection

Incorrect. Refer to Section 4 Lesson 1.

11. You need to _______________ Java code to generate a .class file


Mark for Review
(1) Points

Collect

Compile (*)

Package

Assemble
Incorrect. Refer to Section 4 Lesson 1.

12. In a project, 2 of the classes must contain a main method. True


or False? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 4 Lesson 1.

13. For every opening curly brace { there must be a closing curly
brace} or the program will not compile without error. True or False? Mark for
Review
(1) Points

True (*)

False

Correct

14. Semi-colons at the end of each line are not required to compile
successfully. True or False? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 4 Lesson 1.

15. What symbols are required for a compiler to ignore a comment?


Mark for Review
(1) Points

// (*)

/*

*/
/*/

Incorrect. Refer to Section 4 Lesson 1.

16. When converting gallons to liters its best to put the calculation
result into a variable with a _______________ data type. Mark for Review
(1) Points

int

double (*)

boolean

None of the above

Incorrect. Refer to Section 4 Lesson 1.

17. Two variables are required to support a conversion of one unit of


measure to another unit of measure. True or False? Mark for Review
(1) Points

True (*)

False

Correct

Section 1
(Answer all questions in this section)

1. Which of the two diagrams below illustrate the general form of a


Java program?

Mark for Review


(1) Points

Example A

Example B (*)

Incorrect. Refer to Section 4 Lesson 2.

2. When importing another package into a class you must import the
entire package as well as the package classes that will be called. True or False?
Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 4 Lesson 2.

3. Which of the following defines a driver class? Mark for Review


(1) Points

Contains a main method and other static methods. (*)

Contains classes that define objects.

Contains a main method, a package, static methods, and classes that define objects.

None of the above.

Correct

4. Which of the following defines an object class? Mark for Review


(1) Points

Contains a main method and other static methods.


Contains classes that define objects. (*)

Contains a main method, a package, static methods, and classes that define objects.

None of the above.

Incorrect. Refer to Section 4 Lesson 2.

5. The following defines a package keyword: Mark for Review


(1) Points

Defines where this class lives relative to other classes, and provides a level of
access control. (*)

Provides the compiler information that identifies outside classes used within the
current class.

Precedes the name of the class.

Correct

6. The following defines an import keyword: Mark for Review


(1) Points

Defines where this class lives relative to other classes, and provides a level of
access control.

Provides the compiler information that identifies outside classes used within the
current class. (*)

Precedes the name of the class.

Incorrect. Refer to Section 4 Lesson 2.

7. The following defines a class keyword: Mark for Review


(1) Points

Defines where this class lives relative to other classes, and provides a level of
access control.

Provides the compiler information that identifies outside classes used within the
current class.
Precedes the name of the class. (*)

Incorrect. Refer to Section 4 Lesson 2.

Section 1
(Answer all questions in this section)

1. What is the output of the following lines of code?

int j=7,k=5,m=8,result;
result=j/m*k;
System.out.println(result); Mark for Review
(1) Points

0 (*)

4.375

0.175

280

Correct

2. What is the output of the following lines of code?

int j=7,k=5,m=8,result;
result=j-k%3*m;
System.out.println(result); Mark for Review
(1) Points

16

-9 (*)

Incorrect. Refer to Section 4 Lesson 3.


3. Which of the following is not correct Java code? Mark for
Review
(1) Points

double x=Math.sqrt(16);

double x=Math.pow(3,4)*5.0;

double x=Math.PI*5.0;

double x=Math.pow; (*)

Incorrect. Refer to Section 4 Lesson 3.

4. Which line of Java code assigns the value of 5 raised to the


power of 8 to a? Mark for Review
(1) Points

double a=15^8;

double a=Math.pow(5,8); (*)

int a=Math.pow(8,5);

int a=Math.pow(5,8);

double a=pow(8,5);

Incorrect. Refer to Section 4 Lesson 3.

5. Write a declaration statement that will hold a number like 2.541.


Mark for Review
(1) Points

char number;

int number;

float number; (*)

boolean number;
Incorrect. Refer to Section 4 Lesson 3.

6. Which of the following is the name of a Java primitive data type?


Mark for Review
(1) Points

String

int (*)

Rectangle

Object

Incorrect. Refer to Section 4 Lesson 3.

7. Which of the following is not a legal name for a variable? Mark


for Review
(1) Points

R2d2

dgo2sleep

4geeks (*)

to_be_or_not_to_be

Incorrect. Refer to Section 4 Lesson 3.

8. Which of the following examples of Java code is not correct?


Mark for Review
(1) Points

int x=6;

double d=4.5;

boolean b=1; (*)

char c='r';
Incorrect. Refer to Section 4 Lesson 3.

9. Which of the following statements correctly assigns "3 times 10


to the 4th power" to the variable number? Mark for Review
(1) Points

double number=3*10^4;

double number=3(e4);

double number=3e4; (*)

double number=3*10e4;

Incorrect. Refer to Section 4 Lesson 3.

10. Which line of code does not assign 3.5 to the variable x? Mark
for Review
(1) Points

double x=3.5

x=3.5;

3.5=x; (*)

x=7.0/2.0;

Incorrect. Refer to Section 4 Lesson 3.

11. Consider the following:

You are writing a class and are using a global variable. Inside a method you
declare a local variable with the same name as the global variable.

This programming style is poor because inside the method the global variable will
have precedence over the local variable with the same name.

True or false? Mark for Review


(1) Points

True
False (*)

Incorrect. Refer to Section 4 Lesson 3.

12. What will the method methodA print to the screen?

Mark for Review


(1) Points

18 (*)

15

Correct

13. Which line of Java code properly calculates the volume of a cone
using

where r and h are Java primitive integers? Mark for Review


(1) Points

double V=1/3*3.14*r*r*h;

double V=(double)1/3*Math.PI*Math.pow(r,2)*h; (*)

double V=1/3*Math.PI*Math.pow(r,2)*h;

double V=(double)1/3*Math.PI*Math.pow(2,r)*h;

double V=1/3*3.14*r(2)*h;

Incorrect. Refer to Section 4 Lesson 3.

14. Given the following declaration: int z=5,m=6;

Which line of Java code properly casts one type into another without data loss?
Mark for Review
(1) Points
double x=(double)z/m; (*)

double x=z/m;

double x=(double)(z/m);

double x= double z/m;

Correct

Section 1
(Answer all questions in this section)

1. Consider the following code snippet. What is printed?

String river = new String("Hudson");


System.out.println(river.length()); Mark for Review
(1) Points

6 (*)

Hudson

river

Correct

2. Which of the following creates a String reference named str and


instantiates it? Mark for Review
(1) Points

String str;

str="str";

String s="str";

String str=new String("str"); (*)


Incorrect. Refer to Section 4 Lesson 4.

3. Declaring and instantiating a String is much like any other type


of variable. However, once instantiated, they are final and cannot be changed. True
or false? Mark for Review
(1) Points

True (*)

False

Correct

4. Which of the following statements declares a String object called


name? Mark for Review
(1) Points

String name; (*)

String name

int name;

double name;

Correct

5. Suppose that s1 and s2 are two strings. Which of the statements


or expressions are valid? Mark for Review
(1) Points

(Choose all correct answers)

String s3 = s1 + s2; (*)

String s3 = s1 - s2;

s1 <= s2

s1.compareTo(s2); (*)
int m = s1.length(); (*)

Incorrect. Refer to Section 4 Lesson 4.

6. Consider the following code snippet. What is printed?

Mark for Review


(1) Points

PoliiPolii (*)

Polii

auaacauaac

auaac

ArrayIndexOutofBoundsException is thrown

Correct

7. What will the following code segment output?

Mark for Review


(1) Points

"\\\\\"

\"\\\\\"

"\\" (*)

"\\\"

Incorrect. Refer to Section 4 Lesson 4.

8. What will the following code segment output?

Mark for Review


(1) Points

""\\"
""\"

""\
" (*)

"""\
""

""\
""

Incorrect. Refer to Section 4 Lesson 4.

9. The following program prints "Equal". True or false?

Mark for Review


(1) Points

True (*)

False

Incorrect. Refer to Section 4 Lesson 4.

10. Which of the following creates a String named string? Mark for
Review
(1) Points

char string;

String s;

String string; (*)

String String;

String char;

Incorrect. Refer to Section 4 Lesson 4.

11. Given the code below, which of the following would equate to
true?
String s1 = "yes";
String s2 = "yes";
String s3 = new String(s1); Mark for Review
(1) Points

(Choose all correct answers)

s1 == s2 (*)

s1 = s2

s3 == s1

s1.equals(s2) (*)

s3.equals(s1) (*)

Incorrect. Refer to Section 4 Lesson 4.

12. The String methods equals and compareTo perform the exact same
function. True or false? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 4 Lesson 4.

13. The == operator can be used to compare two String objects. The
result is always true if the two strings are identical. True or false? Mark for
Review
(1) Points

True

False (*)

Incorrect. Refer to Section 4 Lesson 4.

14. The following program prints "Equal". True or false?

Mark for Review


(1) Points

True

False (*)

Incorrect. Refer to Section 4 Lesson 4.

15. Given the code below, which of the following calls are valid?

String s = new String("abc"); Mark for Review


(1) Points

(Choose all correct answers)

s.trim() (*)

s.replace('a', 'A') (*)

s.substring(2) (*)

s.toUpperCase() (*)

s.setCharAt(1,'A')

Incorrect. Refer to Section 4 Lesson 4.

16. Consider the following code snippet. What is printed?

String ocean = new String("Atlantic Ocean");


System.out.println(ocean.indexOf('a')); Mark for Review
(1) Points

3 (*)

11

12
Incorrect. Refer to Section 4 Lesson 4.

17. Consider the following code snippet. What is printed?

Mark for Review


(1) Points

55555

87668 (*)

AtlanticPacificIndianArcticSouthern

The code does not compile.

An ArrayIndexOutofBoundsException is thrown.

Incorrect. Refer to Section 4 Lesson 4.

18. Consider the following code snippet. What is printed?

Mark for Review


(1) Points

55555

87658

AtlanticPacificIndianArcticSouthern

The code does not compile.

An ArrayIndexOutofBoundsException is thrown. (*)

Incorrect. Refer to Section 4 Lesson 4.

Section 1
(Answer all questions in this section)

1. What will print if the following Java code is executed?


Mark for Review
(1) Points

3 (*)

Incorrect. Refer to Section 5 Lesson 1.

2. Which of the following correctly initializes an instance of


Scanner, called "in", that reads input from the console screen? Mark for Review
(1) Points

Scanner in = new Scanner(System.in); (*)

Scanner in = new Scanner("System.in");

Scanner in = Scanner(System.in);

System.in in = new Scanner();

Correct

3. Which of the two diagrams below illustrate the correct syntax for
variables used in an if-else statement?

Mark for Review


(1) Points

Example A (*)

Example B

Correct

4. In an if-else construct, the condition to be evaluated must be


contained within parentheses. True or False? Mark for Review
(1) Points
True (*)

False

Correct

5. The six relational operators in Java are: Mark for Review


(1) Points

>,<,=,!,<=,>=

>,<,=,!=,=<,=>

>,<,=,!=,<=,>=

>,<,==,!=,<=,>= (*)

Incorrect. Refer to Section 5 Lesson 1.

6. Determine whether this boolean expression evaluates to true or


false:
!(3<4&&5>6||6<=6&&7-1==6) Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 5 Lesson 1.

7. The three logic operators in Java are: Mark for Review


(1) Points

!=,=,==

&&, ||, ! (*)

&&,!=,=

&,|,=
Incorrect. Refer to Section 5 Lesson 1.

8. What is the difference between the symbols = and == ? Mark for


Review
(1) Points

The symbol = is used in if statements and == is used in loops.

The symbol == is used to assign values to variables and the = is used in


declarations.

The = is use to assign values to variables and the == compares values. (*)

There is no difference.

Incorrect. Refer to Section 5 Lesson 1.

9. In Java, each case seqment of a switch statement requires the


keyword break to avoid "falling through". Mark for Review
(1) Points

True (*)

False

Correct

10. The following code fragment properly implements the switch


statement. True or false?

default(input)
switch '+':
answer+=num;
break;
case '-':
answer-=num;
break;
!default
System.out.println("Invalid input"); Mark for Review
(1) Points

True

False (*)
Correct

11. How would you use the ternary operator to rewrite this if
statement?

if (skillLevel > 5)
numberOfEnemies = 10;
else
numberOfEnemies = 5; Mark for Review
(1) Points

numberOfEnemies = ( skillLevel > 5) ? 5 : 10;

numberOfEnemies = ( skillLevel < 5) ? 10 : 5;

numberOfEnemies = ( skillLevel >= 5) ? 5 : 10;

numberOfEnemies = ( skillLevel >= 5) ? 10 : 5;

numberOfEnemies = ( skillLevel > 5) ? 10 : 5; (*)

Incorrect. Refer to Section 5 Lesson 1.

12. How would you use the ternary operator to rewrite this if
statement?

if (gender == "male")
System.out.print("Mr.");
else
System.out.print("Ms."); Mark for Review
(1) Points

System.out.print( (gender == "male") ? "Mr." : "Ms." ); (*)

System.out.print( (gender == "male") ? "Ms." : "Mr." );

(gender == "male") ? "Mr." : "Ms." ;

(gender == "male") ? "Ms." : "Mr." ;

Correct
Section 1
(Answer all questions in this section)

1. What is a loop? Mark for Review


(1) Points

A keyword used to skip over the remaining code.

A set of logic that is repeatedly executed until a certain condition is met. (*)

A segment of code that may only ever be executed once per call of the program.

None of the above.

Incorrect. Refer to Section 5 Lesson 2.

2. It is necessary to end all loops at some point in your Java


program. True or false? Mark for Review
(1) Points

True (*)

False

Correct

3. Which of the following are types of loops in Java? Mark for


Review
(1) Points

(Choose all correct answers)

while (*)

if/else

do-while (*)

for (*)
Incorrect. Refer to Section 5 Lesson 2.

4. What is the function of the word "break" in Java? Mark for


Review
(1) Points

It exits the current loop or case statement. (*)

It continues onto the next line of code.

It stops the program from running.

It does not exist in Java.

Correct

5. Identify which situation could be an example of a while loop.


Mark for Review
(1) Points

Taking coins out of a pile one at a time and adding their value to the total until
there are no more coins in the pile to add.

Attending class while school is not over for the day.

Petting each animal at the pet store one at a time until all the animals have been
petted.

All of the above. (*)

Incorrect. Refer to Section 5 Lesson 2.

6. What is one significant difference between a while loop and a do-


while loop? Mark for Review
(1) Points

There is no difference between a DO-WHILE loop and a WHILE loop.

A DO-WHILE loop does not exist in Java and a WHILE loop does.

A DO-WHILE loop includes an int that serves as a counter and a WHILE loop does not.
A DO-WHILE loop will always execute the code at least once, even if the conditional
statement for the WHILE is never true. A WHILE loop is only executed if the
conditional statement is true. (*)

Incorrect. Refer to Section 5 Lesson 2.

7. A counter used in a for loop cannot be initialized within the For


loop statement. True or False? Mark for Review
(1) Points

True

False (*)

Correct

8. The syntax below represents a valid initialization of a for loop


counter. True or False?

public class ForLoop {


public static void main (String args[])
{
for (int i=10; i <20; i++)
{System.out.println("i: "+i); }
}
} Mark for Review
(1) Points

True (*)

False

Correct

9. For both the if-else construct and the for loop, it is true to
say that when the condition statement is met, the construct is exited. True or
False? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 5 Lesson 2.


10. In a for loop, the counter is automatically incremented after
each loop iteration. True or False? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 5 Lesson 2.

11. Which of the following correctly initializes a for loop that


executes 5 times? Mark for Review
(1) Points

for(int i = 0; i == 6; i++)

for(int i = 1; i < 6; i++) (*)

for(int i = 0; i < 5; I++)

for(int i = 1; i < 5; I++)

Incorrect. Refer to Section 5 Lesson 2.

1. Alice uses built-in math operators; they are: Mark for Review
(1) Points

Add and subtract

Multiply and divide

All of the above (*)

None of the above

[Incorrect] Incorrect. Refer to Section 2 Lesson 9.

2. In Alice, we can avoid object collision using what? Mark for


Review
(1) Points
Slowing movements down.

Using math operators. (*)

Downloading the Alice 3 collision detector app.

Using object detection.

[Incorrect] Incorrect. Refer to Section 2 Lesson 9.

3. Which of the following are examples of elements you would test in


your Alice animation? Mark for Review
(1) Points

(Choose all correct answers)

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. (*)

[Correct] Correct

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? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

5. From your Alice lessons, which of the following are reasons why
random numbers would be used by a computer? Mark for Review
(1) Points
(Choose all correct answers)

For opening a project.

For security. (*)

For simulation. (*)

For creating procedures.

[Incorrect] Incorrect. Refer to Section 2 Lesson 4.

6. From your Alice lessons, where on an object do an object's axes intersect?


Mark for Review
(1) Points

At the object's chest

At the object's head

At the object's center point (*)

At the object's bottom

[Correct] Correct

7. Which of the following does not describe methods? Mark for


Review
(1) Points

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. (*)

[Correct] Correct
8. Each parameter is listed with its name first, then its data type.
True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

9. Which of the following actions would require a control statement


to control animation timing? Mark for Review
(1) Points

(Choose all correct answers)

A biped object walking. (*)

A rock object turning.

A fish swimming. (*)

A bird flying. (*)

[Correct] Correct

10. In Alice, the setVehicle procedure will associate one object to


another. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

11. 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) Points
True (*)

False

[Correct] Correct

12. An Alice event is considered what? Mark for Review


(1) Points

A party with at least 20 people.

An object's orientation.

Error handling.

A keystroke or mouse click. (*)

[Correct] Correct

13. From your Alice lessons, variables are fixed and cannot be
changed. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

14. Which of the following is not an Alice variable value type?


Mark for Review
(1) Points

Color

Decimal Number

Whole Number
Function (*)

[Correct] Correct

15. A conditional loop is a loop that will continue forever. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

16. From your Alice lessons, built-in functions provide precise property details
for the following areas: Mark for Review
(1) Points

Proximity and size.

Distance to and nesting.

Proximity, size, spatial relation, and point of view. (*)

Proximity and point of view.

[Correct] Correct

17. In Alice, each class has a set of pre-defined procedures and


functions. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

18. What is the result of the following code?


Mark for Review
(1) Points

x > y : x > y
x < y : x < y

x > y : 1
x < y : 0

x > y : 0
x < y : 1

x > y : true
x < y : false (*)

x > y : false
x < y : true

[Incorrect] Incorrect. Refer to Section 2 Lesson 13.

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

Mark for Review


(1) Points

(Choose all correct answers)

args

n (*)

i (*)

[Correct] Correct

20. From your Alice lessons, which of the following are types of
storyboards? Mark for Review
(1) Points

(Choose all correct answers)


Actual

Textual (*)

Factual

Visual (*)

Fictional

[Incorrect] Incorrect. Refer to Section 2 Lesson 5.

21. In Alice, which of the following is the most likely situation where
procedural abstraction could be used? Mark for Review
(1) Points

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.

[Correct] Correct

22. Before you can begin to develop the animation storyboard, what
must be defined? Mark for Review
(1) Points

The code

The debugging process

The scenario (*)

The control statements


[Correct] Correct

Section 3
(Answer all questions in this section)

23. 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) Points

True

False (*)

[Correct] Correct

24. In Greenfoot, defined methods must be used immediately. True or


false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

25. Use your Greenfoot knowldege: Abstraction occurs in many


different ways in programming. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

26. From your Greenfoot lessons, what types of values cannot be stored in a local
variable? Mark for Review
(1) Points

(Choose all correct answers)


Class name

Objects

Integers

World name

method (*)

[Incorrect] Incorrect. Refer to Section 3 Lesson 10.

27. 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? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

28. How would the following sentence be written in Greenfoot source


code? If Duke's leg is down, and the keyboard key "d" is down... Mark for
Review
(1) Points

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

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

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

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

[Correct] Correct

29. In a Greenfoot loop constructor, which component is a counter


that controls how many times the statement is executed? Mark for Review
(1) Points

Local loop

While loop

Loop variable (*)

Condition

[Correct] Correct

30. From your Greenfoot lessons, how do you test that your code does
not contain bugs? Mark for Review
(1) Points

Write the code.

Inspect the instances.

Review the documentation.

Compile the code. (*)

[Correct] Correct

31. 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) Points

True

False (*)

[Correct] Correct

32. In Greenfoot, constructors can be used to create new instances of


objects. True or false? Mark for Review
(1) Points
True (*)

False

[Correct] Correct

33. In Greenfoot, a defined variable is a variable that is defined in


an instance. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

34. 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) Points

True (*)

False

[Correct] Correct

35. From your Greenfoot lessons, the keyDown method is located in


which class? Mark for Review
(1) Points

Actor

Greenfoot (*)

GreenfootImage

World
[Correct] Correct

36. From your Greenfoot lessons, which axes define an object's position in a
world? Mark for Review
(1) Points

(Choose all correct answers)

x (*)

y (*)

[Correct] Correct

37. From your Greenfoot lessons, which type of constructor can be


used to automate creation of Actor instances? Mark for Review
(1) Points

Animal

World (*)

Actor

Vector

[Correct] Correct

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

True

False (*)
[Correct] Correct

39. In Greenfoot, you can use comparison operators to compare a


variable to a random number. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

40. In Greenfoot, objects are created from: Mark for Review


(1) Points

Methods

Classes (*)

Signatures

Parameters

[Correct] Correct

41. In Greenfoot, in which programming task are the objects identified? Mark
for Review
(1) Points

Define the problem.

Design the solution.

Program the solution. (*)

Test the solution.

[Correct] Correct

42. From your Greenfoot lessons, which of the following is an example


of changing the environment during a Q/A test cycle? Mark for Review
(1) Points

Use a different operating system. (*)

Use the mouse instead of the keyboard.

Use symbols instead of numbers.

All of the above.

[Correct] Correct

43. In Greenfoot, a subclass is created by right-clicking on a


superclass. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

44. In Greenfoot, you must first create an instance before you create
a class. True or false? Mark for Review
(1) Points

True

False (*)

[Correct] Correct

45. From your Greenfoot lessons, to view the methods that a class
inherits, open the code editor and select documentation from the Tools menu. True
or false? Mark for Review
(1) Points

True (*)
False

[Correct] Correct

46. From your Greenfoot lessons, which of the following are properties of an
instance? Mark for Review
(1) Points

Size

Color

Image file

Methods

All of the above (*)

[Correct] Correct

47. From your Greenfoot lessons, which of the following is an example


of a type of data passed through a parameter? Mark for Review
(1) Points

Methods

Classes

Integers (*)

Scenarios

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

48. In the Greenfoot IDE, which of the following is not a property of


an instance? Mark for Review
(1) Points

Position
Inherited methods

Scenario name (*)

Defined methods

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.

49. In Greenfoot, a method with what kind of return type is used to


learn more about an object's orientation? Mark for Review
(1) Points

non-void return type (*)

void return type

object return type

method return type

[Incorrect] Incorrect. Refer to Section 3 Lesson 3.

50. From your Greenfoot lessons, if the condition in an if-statement


is true, the first code segment is executed. True or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

Você também pode gostar