You are on page 1of 106

1. An Alice event is considered what?

(1) Points
A party with at least 20 people.

Mark for Review

An object's orientation.
Error handling.
A keystroke or mouse click. (*)
Incorrect. Refer to Section 2 Lesson 11.
2. 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
3. What does a visual storyboard help the reader understand?
(1) Points
(Choose all correct answers)
The components of the scene. (*)

Mark for Review

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


The actions that will take place. (*)
The code that is debugged.
Incorrect. Refer to Section 2 Lesson 5.
4. Defining the scenario, and the Alice animation to represent the scenario, is the first
step to programming your animation. True or false?
(1) Points
True (*)
False

Mark for Review

Correct
5. 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
6. In Alice, we can avoid object collision using what?
(1) Points
Slowing movements down.

Mark for Review

Using math operators. (*)


Downloading the Alice 3 collision detector app.
Using object detection.
Incorrect. Refer to Section 2 Lesson 9.
7. From your Alice lessons, random numbers are numbers generated by the user with a
pattern in their sequence. True or false?
(1) Points
True

Mark for Review

False (*)
Incorrect. Refer to Section 2 Lesson 4.
8. What is the purpose of a function in Alice?
(1) Points
To define how the object should execute a task.
To compute and answer a question about an object. (*)
To position the object in the Scene editor.

Mark for Review

To save the project.


Incorrect. Refer to Section 2 Lesson 3.
9. 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?
(1) Points

(*)

Mark for Review

Incorrect. Refer to Section 2 Lesson 10.


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

Mark for Review

4
5 (*)
15
10
11. In Alice, functions are dragged into the control statement, not the procedure. True or false?
Mark for Review
(1) Points
True
False (*)
Correct
12. In Alice, the procedures' arguments allow the programmer to adjust the object,
motion, distance amount, and time duration. True or false?
(1) Points
True (*)

Mark for Review

False
Correct
13. In Alice, Do In Order and Do Together:
(1) Points
Are move statements

Mark for Review

Are control statements (*)


Are complex statements
None of the above
Correct
14. In Alice, a computer program requires functions to tell it how to perform the
procedure. True or false?
(1) Points
True

Mark for Review

False (*)
Incorrect. Refer to Section 2 Lesson 6.
15. What should you refer to for the animation's design specifications as you program
your Alice animation?
(1) Points
Code

Mark for Review

Scene editor
Storyboard (*)
Scenario
Correct
16. 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?
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.

Mark

3. Present the problem as an animation. (*)


Correct
17. Expressions with relational operators produce true and false values. True or false?
Mark for Review
(1) Points
True (*)
False
Incorrect. Refer to Section 2 Lesson 13.
18. 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. (*)
Incorrect. Refer to Section 2 Lesson 13.
19. From your Alice lessons, what is a one-shot procedural method?
Review
(1) Points
A procedure that is invoked when the Run button is clicked.

Mark for

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.
Incorrect. Refer to Section 2 Lesson 2.
20. In Alice, we use the WHILE control statement to implement the conditional loop.
True or false?
(1) Points
True (*)
False

Mark for Review

Incorrect. Refer to Section 2 Lesson 8.


21. 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?
Review
(1) Points

Mark for

for all loop


do loop
while loop
if (*)
Incorrect. Refer to Section 2 Lesson 14.
22. When you want specific code to be executed only if certain conditions are met, what
type of Java construct would you use?
(1) Points
while loop

Mark for Review

if (*)
array
boolean
Incorrect. Refer to Section 2 Lesson 14.
Section 3 (Answer all questions in this section)
image below is an example of what construct?

Mark for Review


(1) Points
Method

23. In Greenfoot, the

Conditional (*)
Variable Assignment
Class
Incorrect. Refer to Section 3 Lesson 12.
24. 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. Refer to Section 3 Lesson 12.
25. From your Greenfoot lessons, what is incorrect in this code example:
setLocation(getX(), (int) (altitude);
Mark for Review
(1) Points
Spacing
Capitalization
Parenthesis (*)
Comma
Incorrect. Refer to Section 3 Lesson 12.
26. In Greenfoot, you can use comparison operators to compare a variable to a random number.
True or false?
(1) Points
True (*)
False

Mark for Review

Correct
27. 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
Correct
28. From your Greenfoot lessons, which axes define an object's position in a world?
Mark for Review
(1) Points
(Choose all correct answers)
x (*)
z
y (*)
w
Incorrect. Refer to Section 3 Lesson 5.
29. From your Greenfoot lessons, which type of constructor can be used to automate
creation of Actor instances?
(1) Points
Animal

Mark for Review

World (*)
Actor
Vector
Incorrect. Refer to Section 3 Lesson 5.

30. Which of the following type of audience should you ask to play your Greenfoot
game during the testing phase?
(1) Points
Testing

Mark for Review

Target (*)
Primary
Programmer
Incorrect. Refer to Section 3 Lesson 4.
31. Using the Greenfoot IDE, which of the following programming statements tells the object to
turn 38 degrees?
(1) Points
move():

Mark for Review

move(2);
turn(38); (*)
turn(38):
Incorrect. Refer to Section 3 Lesson 4.
32. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false?
(1) Points
True (*)

Mark for Review

False
Correct
33. 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?
(1) Points
True (*)
False
Incorrect. Refer to Section 3 Lesson 6.

Mark for Review

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?
Review
(1) Points
True

Mark for

False (*)
Incorrect. Refer to Section 3 Lesson 6.
35. 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
Incorrect. Refer to Section 3 Lesson 3.
36. 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()
Incorrect. Refer to Section 3 Lesson 3.
37. 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. Refer to Section 3 Lesson 2.
38. 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?
(1) Points
True (*)

Mark for Review

False
Correct
39. From your Greenfoot lessons, instances do not have any memory. True or false?
Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 3 Lesson 2.
40. In the Greenfoot IDE, which type of variable allows instances to store information?
Mark for Review
(1) Points
Method variable
Instance variable (*)
Class variable
World variable
Incorrect. Refer to Section 3 Lesson 2.
41. In Greenfoot, what is a common letter used for the loop variable?
(1) Points
A
I (*)
X
Y

Mark for Review

Correct
42. How would the following sentence be written in Greenfoot source code? If Duke's
leg is down, and the keyboard key "d" is down...
(1) Points
if (&&isDown ! Greenfoot.isKeyDown("d") )

Mark for Review

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


if (isDown && Greenfoot.isKeyDown("d") ) (*)
if (!Greenfoot.isKeyDown && isDown("d") )
Incorrect. Refer to Section 3 Lesson 10.
43. From your Greenfoot lessons, which of the following logic operators represents
"and"?
Mark for Review
(1) Points
&
&& (*)
=
!
Incorrect. Refer to Section 3 Lesson 10.
44. 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");
Incorrect. Refer to Section 3 Lesson 10.
45. Which method is used to play sound in your Greenfoot game?
Review
(1) Points

Mark for

getSound method
findSound method
playSound method (*)
importSound method
Correct
46. In Greenfoot, which of the following are execution controls?
(1) Points
(Choose all correct answers)
Run (*)

Mark for Review

Act (*)
Speed (*)
Move
Turn
Incorrect. Refer to Section 3 Lesson 1.
47. 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
48. 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"));
(1) Points

Mark for Review

setImage
GreenfootImage
duke100.png (*)
new
Incorrect. Refer to Section 3 Lesson 8.
49. In Greenfoot, actor constructors can be used to create images or values and assign
them to the variables. True or false?
(1) Points
True (*)

Mark for Review

False
Incorrect. Refer to Section 3 Lesson 8.
50. Specific to the Greenfoot IDE, which of the following stop methods is written
correctly?
Mark for Review
(1) Points
stop.Greenfoot( );
Greenfoot(stop);
Greenfoot.stop( ); (*)
Greenfoot.stop(key);
Incorrect. Refer to Section 3 Lesson 8.

Test: Java Fundamentals Midterm Exam


Review your answers, feedback, and question scores below. An asterisk (*) indicates a
correct answer.
Section 2
(Answer all questions in this section)
1.A loop can be infinite (continue forever) or conditional (stops
upon a condition). True or false?

Mark for Review


(1) Points

True (*)
False
Correct
2.Which of the following would not be an argument in an Alice
programming instruction that commands a person object to move
forward 2 meters?

Mark for Review


(1) Points

Number of seconds to execute the programming instruction


Direction to move
Distance to move forward
Person's height (*)
Correct
3.In Alice, the setVehicle procedure will associate one object to
another. True or false?

Mark for Review


(1) Points

True (*)
False
Incorrect. Refer to Section 2 Lesson 6.
4.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. Refer to Section 2 Lesson 6.
5.In Alice, Do In Order and Do Together:

Are move statements


Are control statements (*)
Are complex statements
None of the above

Mark for Review


(1) Points

Correct
6. Which of the following is not a type of event listener in Alice?
(1) Points
Scene Activation/Time

Mark for Review

Cursor (*)
Keyboard
Mouse
Position/Orientation
Incorrect. Refer to Section 2 Lesson 11.
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
8. In Alice, we can avoid object collision using what?
(1) Points
Slowing movements down.

Mark for Review

Using math operators. (*)


Downloading the Alice 3 collision detector app.
Using object detection.
Incorrect. Refer to Section 2 Lesson 9.
9. Alice objects move relative to the orientation of the person viewing the
animation. True or false?
(1) Points
True
False (*)

Mark for Review

Incorrect. Refer to Section 2 Lesson 2.


10. In Alice, declaring a new procedure to shorten code and make it easier to read is
a procedural abstraction technique. True or false?
(1) Points
True (*)

Mark for Review

False
Correct
11. From your Alice lessons, a flowchart could be created in a software program, or
documented in a journal. True or false?
(1) Points
True (*)

Mark for Review

False
Correct
12. In Alice, objects inherit the characteristics of their:
(1) Points
Code

Mark for Review

Project
Class (*)
Program
Incorrect. Refer to Section 2 Lesson 5.
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. Refer to Section 2 Lesson 4.
14. 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
15. From your Alice lessons, animations should be tested by the programmer before
they are considered complete. True or false?
(1) Points
True (*)

Mark for Review

False
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?
(1) Points
True (*)

Mark for Review

False
Correct
17. 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. Refer to Section 2 Lesson 14.
18. From your Alice lessons, which programming instruction represents the
following movement: A turtle moves forward half the distance to the flower.
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

Mark for

this.Turtle move Forward this.Turtle getDistanceTo this.Flower * 2


Incorrect. Refer to Section 2 Lesson 7.
19. Which of the following is not a relational operator?
(1) Points
<

Mark for Review

// (*)
>
=
Correct
20. In Java, which symbol is used to assign one value to another?
Review
(1) Points
<

Mark for

>
= (*)
//
Correct
21. 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?
(1) Points

(*)

Mark for Review

Correct
22. A variable is a named location inside the computer's memory; once there, the
information can be retrieved and changed. True or false?
(1) Points
True (*)

Mark for Review

False
Correct
Section 3 (Answer all questions in this section)
constructors can be used to create new instances of objects. True or false?
Review
(1) Points
True (*)
False
Incorrect. Refer to Section 3 Lesson 8.

23. In Greenfoot,
Mark for

24. When you re-initialize a scenario, Greenfoot automatically displays an instance


of the World subclass in the scenario. True or false?
(1) Points
True (*)

Mark for Review

False
Correct
25. In Greenfoot, actor constructors can be used to create images or values and
assign them to the variables. True or false?
(1) Points
True (*)

Mark for Review

False
Correct
Section 3 (Answer all questions in this section)
checks if a key on the keyboard has been pressed?
(1) Points
keyPress method

26. In Greenfoot, which method


Mark for Review

keyUp method
keyDown method (*)
keyClick method
Incorrect. Refer to Section 3 Lesson 7.
27. 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
28. In Greenfoot, in which programming task are the objects identified?
for Review
(1) Points
Define the problem.

Mark

Design the solution.


Program the solution. (*)
Test the solution.
Incorrect. Refer to Section 3 Lesson 12.
29. 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 execution.
Change the data.
All of the above. (*)
Correct
30. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false?
(1) Points
True (*)

Mark for Review

False
Correct
Section 3 (Answer all questions in this section)

31. 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 (*)
Incorrect. Refer to Section 3 Lesson 2.
32. From your Greenfoot lessons, when a method needs additional data to perform a
task, this data comes from parameters. True or false?
(1) Points
True (*)

Mark for Review

False
Correct
33. 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. Refer to Section 3 Lesson 2.
34. 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?
Review
(1) Points
True (*)

Mark for

False
Correct
35. From your Greenfoot lessons, a comparison operator returns what value when a
number meets its requirement?
(1) Points
0
VOID
1 (*)
NULL

Mark for Review

Incorrect. Refer to Section 3 Lesson 5.


36. Read the following method signature. Using your Greenfoot experience, what does this
method do?
public static int getRandomNumber (int limit)
(1) Points
Returns a random number less than 10.

Mark for Review

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.
Incorrect. Refer to Section 3 Lesson 5.
37. 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?
(1) Points
True

Mark for Review

False (*)
Incorrect. Refer to Section 3 Lesson 5.
38. From your Greenfoot lessons, what can methods belong to?
Review
(1) Points
(Choose all correct answers)
Galleries

Mark for

Classes (*)
Scenarios
Objects (*)
All of the above
Incorrect. Refer to Section 3 Lesson 5.
39. How would the following sentence be written in Greenfoot source code? If
Duke's leg is down, and the keyboard key "d" is down...
(1) Points
if (&&isDown ! Greenfoot.isKeyDown("d") )
if (!isDown && Greenfoot.isKeyDown("d") )

Mark for Review

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


if (!Greenfoot.isKeyDown && isDown("d") )
Incorrect. Refer to Section 3 Lesson 10.
40. Use your Greenfoot knowledge: An array object holds a single variable. True or
false?
Mark for Review
(1) Points
True
False (*)
Correct
41. From your Greenfoot lessons, which of the following logic operators represents "and"?
Mark for Review
(1) Points
&
&& (*)
=
!
Incorrect. Refer to Section 3 Lesson 10.
42. 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. Refer to Section 3 Lesson 10.
43. From your Greenfoot lessons, an instance inherits all of the characteristics of the
class, and those characteristics cannot be changed. True or false?
(1) Points
True

Mark for Review

False (*)
Incorrect. Refer to Section 3 Lesson 1.
44. 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
45. From your Greenfoot lessons, in an if-statement, the programming statements
written in curly brackets are executed simultaneously. True or false?
(1) Points
True

Mark for Review

False (*)
Correct
46. From your Greenfoot lessons, if the condition in an if-statement is true, the first code
segment is executed. True or false?
(1) Points
True (*)

Mark for Review

False
Incorrect. Refer to Section 3 Lesson 3.
47. 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
48. When designing a game in Greenfoot, it helps to define the actions that will take
place in a textual storyboard. True or false?
(1) Points

Mark for Review

True (*)
False
Correct
49. 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?
(1) Points
True (*)

Mark for Review

False
Incorrect. Refer to Section 3 Lesson 6.
50. From your Greenfoot lessons, to save space in the act method, you can write an
entirely new method below it, called a _____________.
(1) Points
Class method
Instance method
Defined method (*)
World method
Code method
Incorrect. Refer to Section 3 Lesson 6.

Mark for Review

1.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
2. 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. Refer to Section 2
Lesson 5.
3. 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?
(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.
(*)
Incorrect. Refer to Section 2
Lesson 5.

Mark for Review


(1) Points

4. 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
Incorrect. Refer to Section 2
Lesson 2.
5. 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 (*)
Correct
6.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. (*)
Incorrect. Refer to Section 2
Lesson 11.
7. 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 (*)
Incorrect. Refer to Section 2
Lesson 12.
8. 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 (*)

Mark for Review


(1) Points

False
Correct
9. The say procedure in Alice plays an audio file. True or
false?

Mark for Review


(1) Points

True
False (*)
Incorrect. Refer to Section 2
Lesson 3.
10. 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. Refer to Section 2
Lesson 14.
11.Main is an example of
what in the following
code?

Mark for
Review
(1) Points

public static void main


(String[] args) {
System.out.println{"Hello
World!");
}
An instance
A method (*)
A class
A variable
Correct
12. Identify an example of an Alice
expression.
"I feel happy."
If or Where
3x3=9 (*)
None of the above
Incorrect. Refer

Mark for Review


(1) Points

to Section 2
Lesson 9.
13. 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} (*)
Incorrect. Refer
to Section 2
Lesson 9.
14. In Java, which symbol is used to assign
one value to another?

Mark for Review


(1) Points

<
>
= (*)
//
Incorrect. Refer
to Section 2
Lesson 13.
15. Which of the following is not a valid
arithmetic operator in Java?
+
/
*
%
None of the above (*)
Incorrect. Refer
to Section 2
Lesson 13.
16.The Alice
IF control
structure
requires
the false

Mark for Review


(1) Points

Mark for Review


(1) Points

statement
to be
populated.
True or
false?
True
False (*)
Correct
17. Define the value of the variable LapCount based on the
following math calculation: LapCount + 10 = 15

Mark for Review


(1) Points

2
4
5 (*)
15
10
Incorrect. Refer to Section 2 Lesson 10.
18. Which of the following is not an Alice variable value
type?

Mark for Review


(1) Points

Color
Decimal Number
Whole Number
Function (*)
Incorrect. Refer to Section 2 Lesson 10.
19. 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. Refer to Section 2 Lesson 6.
20. In Alice, Do In Order and Do Together:

Are move statements


Are control statements (*)
Are complex statements

Mark for Review


(1) Points

None of the above


Incorrect. Refer to Section 2 Lesson 6.
2In
1.Alice,
the
setVeh
icle
proced
ure
will
associa
te one
object
to
anothe
r. True
or
false?

Mark for
Review
(1) Points

True (*)
False
Correct
22. 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. Refer to Section 2 Lesson 7.
Section 3
(Answer all questions in this section)
23. Use your Greenfoot knowledge: A specification of a method is
called a __________________.

Subclass
Class
Signature (*)
Parameter

Mark for
Review
(1) Points

Correct
24. 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.
25. In Greenfoot, the image below is an example of what construct?

Method
Conditional (*)
Variable Assignment
Class
Incorrect. Refer to Section 3 Lesson 12.
26.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()
Incorrect. Refer to Section 3

Mark for
Review
(1) Points

Lesson 3.
27. From your Greenfoot lessons, source code is written in
the Code editor. True or false?

Mark for Review


(1) Points

True (*)
False
Incorrect. Refer to Section 3
Lesson 3.
28. In Greenfoot, what happens if the end to a while loop isn't
established?

Mark for Review


(1) Points

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.
Incorrect. Refer to Section 3
Lesson 10.
29. 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
Incorrect. Refer to Section 3
Lesson 10.
30. In the Greenfoot IDE, what symbols indicate that the
variable is an array?
Square brackets [ ] (*)
Curly brackets { }
Semicolon ;
Colon :
Incorrect. Refer to Section 3
Lesson 10.
31.In
Greenfoot,
when is a
local
variable
most often

Mark for Review


(1) Points

Mark for Review


(1) Points

used?
Within the scenario
Within the act method
Within the world constructor
Within loop constructs (*)
Incorrect. Refer to Section 3
Lesson 10.
32. In Greenfoot, a subclass is a specialization of a
superclass. True or false?

Mark for
Review
(1) Points

True (*)
False
Correct
33. 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.
Incorrect. Refer to Section 3
Lesson 1.
34. From your Greenfoot lessons, the keyDown method is
located in which class?

Mark for
Review
(1) Points

Actor
Greenfoot (*)
GreenfootImage
World
Incorrect. Refer to Section 3
Lesson 7.
35. In the Greenfoot IDE, which of the following is not a
property of an instance?

Position
Inherited methods

Mark for
Review
(1) Points

Scenario name (*)


Defined methods
Incorrect. Refer to Section 3
Lesson 2.
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
Incorrect. Refer to Section 3
Lesson 2.
37. What type of Greenfoot method would be used to turn an
object?

Mark for
Review
(1) Points

orientTo( );
turnAround( );
move ( );
turn( ); (*)
Incorrect. Refer to Section 3
Lesson 2.
38. 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.
Incorrect. Refer to Section 3
Lesson 2.

Mark for
Review
(1) Points

39. 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
40. 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
41.Use your
Greenfoot
knowldege:
Abstraction
occurs in
many
different
ways in
programming.
True or false?

Mark for Review


(1) Points

True (*)
False
Incorrect. Refer to Section 3
Lesson 9.
42. 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. Refer to Section 3
Lesson 8.
43. 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. Refer to Section 3
Lesson 8.
44. From your Greenfoot lessons, what is the parameter
of the following constructor that creates a new image,
and designates it to the Actor class?

Mark for
Review
(1) Points

setImage (new GreenfootImage("duke100.png"));


setImage
GreenfootImage
duke100.png (*)
new
Incorrect. Refer to Section 3
Lesson 8.
45. 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.
Incorrect. Refer to Section 3
Lesson 5.
46.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

Mark for
Review
(1) Points

Incorrect. Refer to Section 3


Lesson 5.
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
Correct
48. 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
Incorrect. Refer to Section 3
Lesson 5.
49. From your Greenfoot lessons, a problem statement
defines the purpose for your game. True or false?

Mark for
Review
(1) Points

True (*)
False
Correct
50. 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 (*)
Incorrect. Refer to Section 3
Lesson 4.

Mark for
Review
(1) Points

Section 2
(Answer all questions in this section)
1. 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.
Incorrect. Refer to Section 2 Lesson 14.
2. 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.
Correct
3. Which of the following is not a type of event listener in Alice?
Scene Activation/Time
Cursor (*)
Keyboard
Mouse
Position/Orientation
Incorrect. Refer to Section 2 Lesson 11.
4. 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
Correct
5. Which of the following is not an Alice variable value type?
Color
Decimal Number
Whole Number

Function (*)
Correct
6.InAlice,which
function is
used to move
an object
directly to the
center point of
anotherobject?
getObject
getDuration
getDepth
getDistance (*)
Incorrect. Refer to Section 2 Lesson 7.
7. 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. (*)
Incorrect. Refer to Section 2 Lesson 13.
8. The following are examples of what in Java?
boolean
bite
char
short
int
long
float
double
Types (*)
Expressions
Variables
Specifications
Incorrect. Refer to Section 2 Lesson 13.
9. Which of the following would not be an argument in an Alice
programming instruction that commands a person object to move forward
2 meters?
Number of seconds to execute the programming instruction
Direction to move
Distance to move forward
Person's height (*)
Incorrect. Refer to Section 2 Lesson 3.
10. 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.

Correct
11.From your
Alice lessons,
the IF control
structure can
process one
true and one
false
response.
True or false?
True (*)
False
Incorrect. Refer to Section 2 Lesson
8.
12. 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
Correct
13. In Alice, which of the following programming statements
moves the cat backward, half the distance to the bird?
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} (*)
Incorrect. Refer to Section 2 Lesson
9.
14. In Alice, which of the following programming statements
moves the butterfly forward, double the distance to the tree?
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
15. 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?
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. (*)
Incorrect. Refer to Section 2 Lesson
12.
16. What should
you refer to for
the animation's
design
specifications
as you
program your
Alice
animation?
Code
Scene editor
Storyboard (*)
Scenario
Incorrect.
Refer to
Section 2
Lesson 12.
17. 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
Incorrect.
Refer to
Section 2
Lesson 5.
18. From your Alice lessons, a
flowchart could be created
in a software program, or
documented in a journal.
True or false?
True (*)
False
Correct
19. In Alice, which of the
following are benefits of
separating out motions into
their own procedures?
(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 5.
20. In Alice, a computer
program requires functions
to tell it how to perform the
procedure. True or false?
True
False (*)
Incorrect.
Refer to
Section 2
Lesson 6.
21. Which of the
following
actions would
require a control
statement to
control
animation
timing?
(Choose all correct
answers)
A biped object walking.
(*)
A rock object turning.
A fish swimming. (*)
A bird flying. (*)
Incorrect.
Refer to
Section 2
Lesson 6.
22. In Alice, Do In Order and
Do Together:
Are move statements
Are control statements
(*)
Are complex statements
None of the above
Correct

Section 3
(Answer all questions in this section)
23. From your Greenfoot
lessons, which of the
following is an example of
changing test data during a
Q/A test cycle?
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.
24. From your Greenfoot
lessons, what is incorrect in
this code example:
setLocation(getX(), (int)
(altitude);
Spacing
Capitalization
Parenthesis (*)
Comma
Incorrect.
Refer to
Section 3
Lesson 12.
25. In Greenfoot, the image
below is an example of
what construct?

Method
Comment
Constructor (*)
Class
Incorrect.
Refer to
Section 3
Lesson 12.
26. 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?
New subclass...
Set image...
new Duke() (*)
Inspect
Remove
Correct
27. In Greenfoot, a subclass is created by
right-clicking on a superclass. True or
false?
True (*)
False
Correct
28. From your Greenfoot lessons, the
keyDown method is located in which
class?
Actor
Greenfoot (*)
GreenfootImage
World
Incorrect. Refer to
Section 3 Lesson 7.
29. Which of the following type of audience
should you ask to play your Greenfoot
game during the testing phase?
Testing
Target (*)
Primary
Programmer
Incorrect. Refer to
Section 3 Lesson 4.
30. From your Greenfoot lessons, how do you
test that your code does not contain bugs?
Write the code.
Inspect the instances.
Review the documentation.
Compile the code. (*)
Correct
31. From your
Greenfoot lessons,
what types of
values cannot be
stored in a local
variable?
(Choose all correct answers)

Class name
Objects
Integers
World name
method (*)
Incorrect.
Refer to
Section 3
Lesson 10.
32. 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");
Incorrect.
Refer to
Section 3
Lesson 10.
33. 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
Correct
34. 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.
Incorrect.
Refer to

Mark for Review


(1) Points

Section 3
Lesson 10.
35. 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?
True (*)
False
Correct
36. In Greenfoot,
defined methods
must be used
immediately.
True or false?
True
False (*)
Correct
37. In Greenfoot, actor constructors can be
used to create images or values and assign
them to the variables. True or false?
True (*)
False
Correct
38. In Greenfoot, a constructor has a void
return type. True or false?
True
False (*)
Incorrect. Refer to
Section 3 Lesson 8.
39. Which Greenfoot control operator is used
to test if two values are equal?
>= operator
== operator (*)
= operator
!= operator
Correct
40. From your Greenfoot lessons, which of the
following methods return the current
rotation of the object?
World getClass()
World getWorld()
int getRotation() (*)
getXY()
Correct

1.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?

(*)

Correct

Mark for
Review
(1) Points

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

True
False (*)
Incorrect. Refer to Section 2 Lesson 10.
3.
Which of the following is an example of nesting in an Alice
program?
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. (*)
Correct

4.
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
Incorrect. Refer to Section 2 Lesson 11.

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

Mark for Review


(1) Points

True (*)
False
Correct

6. Which of
the
following
is not a
valid
primitive
type in
Java?

Mark for Review


(1) Points

boolean
String (*)
long
int
double
Incorrect. Refer to Section 2 Lesson 13.

7. Results of
arithmetic
operations
cannot be
stored in
a variable.
True or
false?

Mark for Review


(1) Points

True
False (*)
Correct
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?
A submethod
A subprogram
An instance (*)
A subclass
A variable class
Incorrect. Refer to Section 2 Lesson 14.

Mark for Review


(1) Points

9. In Java, a function is a method that returns a value. True or false?

Mark for Review


(1) Points

True (*)
False
Correct

10. 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.
Incorrect. Refer to Section 2 Lesson 7.

11. 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?

True
False (*)
Incorrect. Refer to Section 2 Lesson 12.

12. From your


Alice
lessons, at
what point in
the
animation
process do

Mark for Review


(1) Points

you confirm
the items on
the
"Checklist for
Animation
Completion"?
Before designing the animation.
During and after the animation process. (*)
At the beginning of the animation process.
After adding each procedure to the Code editor.

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

14. 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.
Refer to
Section 2
Lesson 6.
15. In Alice, the
setVehicle
procedure will
associate one
object to
another. True
or false?
True (*)

Mark for Review


(1) Points

False
Correct

16. 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
Incorrect. Refer to Section 2 Lesson 6.
17. 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
18. 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
Incorrect. Refer to Section 2 Lesson 5.
19. 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 5.
20. Alice uses built-in math operators; they are:

Add and subtract

Mark for Review


(1) Points

Multiply and divide


All of the above (*)
None of the above
Incorrect. Refer to Section 2 Lesson 9.

21. 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
22. 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
(Answer all questions in this section)
23. 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
24. From your Greenfoot lessons, which axes define an object's position in a
world?
(Choose all correct answers)
x (*)

Mark for Review


(1) Points

z
y (*)
w
Correct
25. From your Greenfoot lessons, which programming statement creates a
new Duke object, and places it at x = 120, y = 100 in the world?

Mark for Review


(1) Points

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


addClass (new Duke( ), 120, 100);
addWorld (new Duke( ), 120, 100);
Move(120,100);
Correct

26. 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
27. In Greenfoot, a defined variable is a variable that is defined in an
instance. True or false?

Mark for Review


(1) Points

True
False (*)
Incorrect. Refer to Section 3 Lesson 8.
28. 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.

Mark for Review


(1) Points

At the top of the source code, before the constructors and methods.
(*)
Incorrect. Refer to Section 3 Lesson 8.
29. Using the Greenfoot IDE, when is a constructor automatically executed?

Mark for Review


(1) Points

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.
Incorrect. Refer to Section 3 Lesson 8.
30. 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 (*)
Incorrect. Refer to Section 3 Lesson 2.

31. 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
32. In the following Greenfoot method signature, which is the method
name?
void turnLeft()
()
void
turnLeft (*)
Left

Mark for Review


(1) Points

Incorrect. Refer to Section 3 Lesson 2.


33. What type of Greenfoot method would be used to turn an object?

Mark for Review


(1) Points

orientTo( );
turnAround( );
move ( );
turn( ); (*)
Incorrect. Refer to Section 3 Lesson 2.
34. 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. (*)
Incorrect. Refer to Section 3 Lesson 3.
35. From your Greenfoot lessons, source code is written in the Code editor.
True or false?

Mark for Review


(1) Points

True (*)
False
Correct

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

Mark for Review


(1) Points

Method (*)
Class
Signature
Parameter
Correct
37. In Greenfoot, objects are created from:

Methods
Classes (*)
Signatures

Mark for Review


(1) Points

Parameters
Correct
38. 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
39. In the Greenfoot IDE, what symbols indicate that the variable is an
array?

Mark for Review


(1) Points

Square brackets [ ] (*)


Curly brackets { }
Semicolon ;
Colon :
Incorrect. Refer to Section 3 Lesson 10.
40. In Greenfoot, a local variable is declared at the beginning of a class.
True or false?

Mark for Review


(1) Points

True
False (*)
Correct

41. 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
42. Use your Greenfoot knowledge:
An array object holds a single
variable. True or false?

Mark for Review


(1) Points

True
False (*)
Incorrect. Refer to Section
3 Lesson 10.
43. 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
44. Which of the following are
examples of a Greenfoot
superclass?

Mark for Review


(1) Points

(Choose all correct answers)


Dog
Cat
Parrot
Actor (*)
World (*)
Incorrect. Refer to Section
3 Lesson 1.
45. 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

46. 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 (*)
Incorrect.
Refer to
Section 3
Lesson 4.
47. 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
48. In Greenfoot,
what type of
parameter does
the keyDown
method expect?

Mark for Review


(1) Points

String (*)
Boolean
Integer
Method
Incorrect.
Refer to
Section 3
Lesson 7.
49. 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.

Mark for Review


(1) Points

Write the
method in
the source
code.
Correct
50. 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?
True (*)
False
Correct

Mark for Review


(1) Points

Test: Java Fundamentals Midterm Exam

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

Top of Form
Section 2
(Answer all questions in this section)

1.

Which of the following does not describe methods?

A subprogram that acts on data and often returns a value.


A set of code that is referred to by name.
Can be called at any point in a program simply by utilizing its name.
Is associated with an instance variable. (*)

Mark for Review


(1) Points

Incorrect. Refer to Section 2 Lesson 14.

2.

What do lines 9 and 11 do in the following code?

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.

Mark for Review


(1) Points

Incorrect. Refer to Section 2 Lesson 14.

3.

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. Refer to Section 2 Lesson 5.

4.

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.

Incorrect. Refer to Section 2 Lesson 5.

5.

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

True (*)
False

Incorrect. Refer to Section 2 Lesson 5.

Test: Java Fundamentals Midterm Exam

Mark for Review


(1) Points

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

Top of Form
Section 2
(Answer all questions in this section)

6.

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

Incorrect. Refer to Section 2 Lesson 13.

7.

Which of the following is not a relational operator?

Mark for Review

(1) Points

<
// (*)
>
=

Incorrect. Refer to Section 2 Lesson 13.

8.

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

9.

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

Mark for Review

(1) Points

True (*)
False

Incorrect. Refer to Section 2 Lesson 6.

10.

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. Refer to Section 2 Lesson 6.

Test: Java Fundamentals Midterm Exam

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

Top of Form
Section 2
(Answer all questions in this section)

11.

All objects in Alice have three dimensional coordinates on which axes?

(Choose all correct answers)

x (*)
y (*)
z (*)
w
All of the above

Incorrect. Refer to Section 2 Lesson 2.

Mark for Review


(1) Points

12.

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. Refer to Section 2 Lesson 3.

13.

Functions answer questions about an object, such as its height, width, depth and even distance to another object. True or
false?

True (*)
False

Correct

Mark for Review


(1) Points

14.

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. Refer to Section 2 Lesson 4.

15.

What should you refer to for the animation's design specifications as you program your Alice animation?

Code
Scene editor

Mark for Review


(1) Points

Storyboard (*)
Scenario

Correct

Test: Java Fundamentals Midterm Exam

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

Top of Form
Section 2
(Answer all questions in this section)

16.

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 (*)

Incorrect. Refer to Section 2 Lesson 12.

17.

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

Incorrect. Refer to Section 2 Lesson 8.

18.

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

Color
Decimal Number
Whole Number
Function (*)

Incorrect. Refer to Section 2 Lesson 10.

Mark for Review


(1) Points

19.

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

20.

Alice uses built-in math operators; they are:

Add and subtract


Multiply and divide

Mark for Review


(1) Points

All of the above (*)


None of the above

Correct

Test: Java Fundamentals Midterm Exam

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

Top of Form
Section 2
(Answer all questions in this section)

21.

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} (*)

Incorrect. Refer to Section 2 Lesson 9.

22.

An Alice event is considered what?

A party with at least 20 people.


An object's orientation.
Error handling.
A keystroke or mouse click. (*)

Incorrect. Refer to Section 2 Lesson 11.

Mark for Review


(1) Points

Section 3
(Answer all questions in this section)

23.

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

Mark for Review


(1) Points

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.

Incorrect. Refer to Section 3 Lesson 8.

24.

Using Greenfoot, how do we change the size and resolution of the World instance?

Edit the methods in the class.


Edit the values in the constructor. (*)

Mark for Review


(1) Points

Delete the instance.


Edit the values in the class's act method.

Correct

25.

In Greenfoot, an if-statement is used to alternate between displaying two images in an instance. True or false?

True
False (*)

Incorrect. Refer to Section 3 Lesson 8.

Test: Java Fundamentals Midterm Exam

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

Mark for Review


(1) Points

Top of Form
Section 3
(Answer all questions in this section)

26.

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.

27.

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. Refer to Section 3 Lesson 2.

28.

From your Greenfoot lessons, instances do not have any memory. True or false?

Mark for Review


(1) Points

True
False (*)

Incorrect. Refer to Section 3 Lesson 2.

29.

What type of Greenfoot method would be used to turn an object?

orientTo( );

Mark for Review


(1) Points

turnAround( );
move ( );
turn( ); (*)

Incorrect. Refer to Section 3 Lesson 2.

30.

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

True (*)
False

Correct

Test: Java Fundamentals Midterm Exam

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

Mark for Review


(1) Points

Top of Form
Section 3
(Answer all questions in this section)

31.

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

32.

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.

33.

From your Greenfoot lessons, which of the following is not a characteristic of a static method?

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. Refer to Section 3 Lesson 5.

Mark for Review


(1) Points

34.

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

Incorrect. Refer to Section 3 Lesson 5.

35.

From your Greenfoot lessons, a comparison operator returns what value when a number meets its requirement?

0
VOID
1 (*)
NULL

Incorrect. Refer to Section 3 Lesson 5.

Mark for Review


(1) Points

Test: Java Fundamentals Midterm Exam

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

Top of Form
Section 3
(Answer all questions in this section)

36.

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

Actor
Greenfoot (*)
GreenfootImage
World

Mark for Review


(1) Points

Correct

37.

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 (*)

Incorrect. Refer to Section 3 Lesson 3.

38.

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

39.

In Greenfoot, defined methods must be used immediately. True or false?

Mark for Review

(1) Points

True
False (*)

Incorrect. Refer to Section 3 Lesson 6.

40.

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.

Incorrect. Refer to Section 3 Lesson 6.

Mark for Review


(1) Points

Test: Java Fundamentals Midterm Exam

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

Top of Form
Section 3
(Answer all questions in this section)

41.

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

Define the problem.


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

Correct

Mark for Review


(1) Points

42.

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 execution.
Change the data.
All of the above. (*)

Incorrect. Refer to Section 3 Lesson 12.

43.

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

Mark for Review


(1) Points

Method
Conditional (*)
Variable Assignment
Class

Incorrect. Refer to Section 3 Lesson 12.

44.

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

45.

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

Incorrect. Refer to Section 3 Lesson 1.

Test: Java Fundamentals Midterm Exam

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

Top of Form
Section 3
(Answer all questions in this section)

46.

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

Mark for Review


(1) Points

True (*)
False

Incorrect. Refer to Section 3 Lesson 9.

47.

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

&
&& (*)
=
!

Incorrect. Refer to Section 3 Lesson 10.

Mark for Review


(1) Points

48.

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

Mark for Review


(1) Points

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.

Correct

49.

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

Square brackets [ ] (*)


Curly brackets { }
Semicolon ;
Colon :

Mark for Review


(1) Points

Incorrect. Refer to Section 3 Lesson 10.

50.

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

I = 100 + i
i=1
i=i
i = i + 1 (*)

Incorrect. Refer to Section 3 Lesson 10.

Page 10 of 10
Bottom of Form

Mark for Review


(1) Points

Tugas 1 Prakarya Dan Kewirausahaan


Nama Produk : Pisang Coklat

Smk Muhammadiyah 5 Babat


Tahun Pelajaran 2013/2014
Nama Anggota :
1. Dody Setiawan (Koordinator)
2. Rohman Alfianto
3. Sefri Firmansyah
4. Silvi Dewi Indah A.L
5. Zuriatus Sholiha

i. Bahan Dasar Pembuatan :


Bahan kulit:
200 g tepung terigu
1 sdt baking powder
1 butir telur
50 g gula pasir
300 ml susu cair
1/4 sdt garam
2 sdm margarin, lelehkan

Bahan isi:
3 buah pisang raja, potong bulat 1/2 cm
30 g meises coklat
100 g keju cheddar, parut

ii. Proses / Cara Pembuatan :


Cara membuat:
1. Kulit: Campur telur dan gula pasir, aduk hingga gula pasir
larut. Tuang susu cair, aduk rata. Masukkan ke dalam campuran
tepung terigu dan baking powder yang sudah diayak. Aduk rata.
Tambahkan garam dan margarin. Aduk hingga rata. Diamkan
selama 15 menit.
2. Panaskan wajan dadar anti lengket. Tuang satu sendok sayur
adonan, ratakan hingga tipis. Masak dengan api kecil hingga
matang. Lakukan hingga adonan habis. Sisihkan.
3. Ambil selembar kulit, tata pisang raja, meises coklat, dan keju
cheddar parut di satu sisi. Lipat dua dan lipat lagi jadi dua.
4. Sajikan.

iii. Modal Awal : Rp. 50.000


iv. Harga Penjualan : Rp. 2.000
v. Keunggulan Produk :
Dibuat Sendiri
Rendah Lemak
Tidak ada bahan pengawet
Higinis

No.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

Nama

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

You might also like