Sie sind auf Seite 1von 106

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

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

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

False
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? Mark for Review
(1) Points
Slowing movements down.

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

False (*)

Incorrect. Refer to Section 2 Lesson 4.


8. What is the purpose of a function in Alice? Mark for Review
(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.


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

(*)
Incorrect. Refer to Section 2 Lesson 10.
10. 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
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? Mark for Review
(1) Points
True (*)

False

Correct
13. 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
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. What should you refer to for the animation's design specifications as you program
your Alice animation? Mark for Review
(1) Points
Code

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

Incorrect. Refer to Section 2 Lesson 2.


20. In Alice, we use the WHILE control statement to implement the conditional loop.
True or false? Mark for Review
(1) Points
True (*)

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

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

if (*)

array

boolean

Incorrect. Refer to Section 2 Lesson 14.


Section 3 (Answer all questions in this section) 23. 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.


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

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

y (*)

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

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

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

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

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

False

Incorrect. Refer to Section 3 Lesson 6.


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

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

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

I (*)

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

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

findSound method

playSound method (*)

importSound method

Correct
46. In Greenfoot, which of the following are execution controls? Mark for Review
(1) Points (Choose all correct answers)
Run (*)

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")); Mark for Review


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

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
Mark for Review
upon a condition). True or false?
(1) Points
True (*)
False

Correct
2.Which of the following would not be an argument in an Alice
Mark for Review
programming instruction that commands a person object to move
(1) Points
forward 2 meters?
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
Mark for Review
another. True or false?
(1) Points
True (*)
False

Incorrect. Refer to Section 2 Lesson 6.


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

Incorrect. Refer to Section 2 Lesson 6.


5.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
6. 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

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

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

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

False

Correct
11. 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
12. In Alice, objects inherit the characteristics of their: Mark for Review
(1) Points
Code

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

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

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


19. Which of the following is not a relational operator? Mark for Review
(1) Points
<

// (*)

>

Correct
20. In Java, which symbol is used to assign one value to another? Mark for
Review
(1) Points
<

>

= (*)

//

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

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

False

Correct
Section 3 (Answer all questions in this section) 23. In Greenfoot,
constructors can be used to create new instances of objects. True or false? Mark for
Review
(1) Points
True (*)

False

Incorrect. Refer to Section 3 Lesson 8.


24. 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
25. 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
Section 3 (Answer all questions in this section) 26. 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. 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? Mark
for Review
(1) Points
Define the problem.

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

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

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

False

Correct
35. From your Greenfoot lessons, a comparison operator returns what value when a
number meets its requirement? Mark for Review
(1) Points
0

VOID

1 (*)

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

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

False (*)

Incorrect. Refer to Section 3 Lesson 5.


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

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

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

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

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

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 _____________. Mark for Review
(1) Points
Class method

Instance method

Defined method (*)

World method

Code method

Incorrect. Refer to Section 3 Lesson 6.


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

Correct
2. From your Alice lessons, which of the following is a
Mark for Review
tool to show the logic of an animation?
(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
Mark for Review
wings forward and backward while moving forward
(1) Points
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.
4. All objects in Alice have three dimensional coordinates
Mark for Review
on which axes?
(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
Mark for Review
programming is to create a table to align the storyboard
(1) Points
steps to the programming instructions. True or false?
True
False (*)

Correct
6.An Alice
Mark for Review
event is
(1) Points
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.
7. From your Alice lessons, functional decomposition is the
Mark for Review
process of taking a complex problem or process and
(1) Points
growing it into larger parts that are easier to manage.
True or false?
True
False (*)

Incorrect. Refer to Section 2


Lesson 12.
8. From your Alice lessons, a textual storyboard provides a
Mark for Review
detailed, ordered list of the actions each object performs
(1) Points
in each scene of the animation. True or false?
True (*)
False

Correct
9. The say procedure in Alice plays an audio file. True or
Mark for Review
false?
(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
Mark for Review
age of 18 and a different message to display if the user is
(1) Points
18 or older, what type of construct would you use?
for all loop
do loop
while loop
if (*)

Incorrect. Refer to Section 2


Lesson 14.
11.Main is an example of
Mark for
what in the following
Review
code?
(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
Mark for Review
expression.
(1) Points
"I feel happy."
If or Where
3x3=9 (*)
None of the above

Incorrect. Refer
to Section 2
Lesson 9.
13. In Alice, which of the following
Mark for Review
programming statements moves the cat
(1) Points
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 Java, which symbol is used to assign
Mark for Review
one value to another?
(1) Points
<
>
= (*)
//

Incorrect. Refer
to Section 2
Lesson 13.
15. Which of the following is not a valid
Mark for Review
arithmetic operator in Java?
(1) Points
+
/
-
*
%
None of the above (*)

Incorrect. Refer
to Section 2
Lesson 13.
16.The Alice
Mark for Review
IF control
(1) Points
structure
requires
the false
statement
to be
populated.
True or
false?
True
False (*)

Correct
17. Define the value of the variable LapCount based on the
Mark for Review
following math calculation: LapCount + 10 = 15
(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
Mark for Review
type?
(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
Mark for Review
statement to control animation timing?
(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:
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.


2In
Mark for
1.Alice,
Review
the
(1) Points
setVeh
icle
proced
ure
will
associa
te one
object
to
anothe
r. True
or
false?
True (*)
False

Correct
22. From your Alice lessons, which programming instruction represents
Mark for
the following movement: A turtle moves forward half the distance to
Review
the flower.
(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
Mark for
called a __________________.
Review
(1) Points
Subclass
Class
Signature (*)
Parameter
Correct
24. From your Greenfoot lessons, which of the following is an example
Mark for
of changing test data during a Q/A test cycle?
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?
Mark for
Review
(1) Points

Method
Conditional (*)
Variable Assignment
Class

Incorrect. Refer to Section 3 Lesson 12.


26.From
Mark for Review
your
(1) Points
Greenfoot
lessons,
which of
the
following
methods
return the
current
rotation
of the
object?
World getClass()
World getWorld()
int getRotation() (*)
getXY()

Incorrect. Refer to Section 3


Lesson 3.
27. From your Greenfoot lessons, source code is written in
Mark for Review
the Code editor. True or false?
(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
Mark for Review
established?
(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
Mark for Review
boolean expressions?
(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
Mark for Review
variable is an array?
(1) Points
Square brackets [ ] (*)
Curly brackets { }
Semicolon ;
Colon :

Incorrect. Refer to Section 3


Lesson 10.
31.In
Mark for Review
Greenfoot,
(1) Points
when is a
local
variable
most often
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
Mark for
superclass. True or false?
Review
(1) Points
True (*)
False

Correct
33. Which of the following demonstrates a Greenfoot
Mark for
subclass/superclass relationship?
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
Mark for
located in which class?
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
Mark for
property of an instance?
Review
(1) Points
Position
Inherited methods
Scenario name (*)
Defined methods

Incorrect. Refer to Section 3


Lesson 2.
36.From your
Mark for Review
Greenfoot
(1) Points
lessons,
when a
method
needs
additional
data to
perform a
task, this
data comes
from
parameters.
True or
false?
True (*)
False

Incorrect. Refer to Section 3


Lesson 2.
37. What type of Greenfoot method would be used to turn an
Mark for
object?
Review
(1) Points
orientTo( );
turnAround( );
move ( );
turn( ); (*)

Incorrect. Refer to Section 3


Lesson 2.
38. What does the following Greenfoot programming
Mark for
statement do?
Review
(1) Points
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.
39. Use your Greenfoot knowledge to answer the question.
Mark for
One reason to write a defined method in a class is to
Review
change the behavior of the class. True or false?
(1) Points
True
False (*)

Correct
40. In Greenfoot, a way to have all subclasses of a
Mark for
superclass inherit a method is by adding the method to
Review
the superclass. True or false?
(1) Points
True (*)
False

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

Incorrect. Refer to Section 3


Lesson 9.
42. From your Greenfoot lessons, where should the stop
Mark for
method be inserted into the source code?
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
Mark for
between displaying two images in an instance. True or
Review
false?
(1) Points
True
False (*)

Incorrect. Refer to Section 3


Lesson 8.
44. From your Greenfoot lessons, what is the parameter
Mark for
of the following constructor that creates a new image,
Review
and designates it to the Actor class?
(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
Mark for
statement execute it's second code segment?
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.

Incorrect. Refer to Section 3


Lesson 5.
46.From your
Mark for Review
Greenfoot
(1) Points
lessons,
which type
of
constructor
can be
used to
automate
creation of
Actor
instances?
Animal
World (*)
Actor
Vector
Incorrect. Refer to Section 3
Lesson 5.
47. From your Greenfoot lessons, what can methods belong
Mark for
to?
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
Mark for
compare a variable to a random number. True or false?
Review
(1) Points
True (*)
False

Incorrect. Refer to Section 3


Lesson 5.
49. From your Greenfoot lessons, a problem statement
Mark for
defines the purpose for your game. True or false?
Review
(1) Points
True (*)
False

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

Incorrect. Refer to Section 3


Lesson 4.
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
Mark for Review
statement is a correct example
(1) Points
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
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 Mark for
collides with the shark? Review
(1) Points

(*)

Correct
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, Mark for Review
complete the (1) Points
following
sentence:
When coded,
an event
triggers a
___________.
Infinite loop
Gallery

Procedure (*)

Scene

Incorrect. Refer to Section 2 Lesson 11.

5. In Alice,
we use Mark for Review
the WHILE (1) Points
control
statement
to
implement
the
conditional
loop. True
or false?
True (*)

False

Correct

6. Which of
the Mark for Review
following (1) Points
is not a
valid
primitive
type in
Java?
boolean

String (*)

long
int

double

Incorrect. Refer to Section 2 Lesson 13.

7. Results of
arithmetic Mark for Review
operations (1) Points
cannot be
stored in
a variable.
True or
false?
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? Mark for Review
(1) Points
A submethod

A subprogram

An instance (*)

A subclass

A variable class

Incorrect. Refer to Section 2 Lesson 14.


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 Mark for Review
Alice (1) Points
lessons,
built-in
functions
provide
precise
property
details
for the
following
areas:
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 Mark for Review
lessons, at (1) Points
what point in
the
animation
process do
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 Mark for Review
define (1) Points
your own
procedures
for a class,
but not
your own
functions.
True or
false?
True

False (*)
Correct

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

False (*)

Incorrect.
Refer to
Section 2
Lesson 6.
15. In Alice, the
setVehicle Mark for Review
procedure will (1) Points
associate one
object to
another. True
or false?
True (*)
False

Correct

16. In Alice,
Do In Mark for Review
Order (1) Points
and Do
Together:
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:


Mark for Review
(1) Points
Add and subtract
Multiply and divide

All of the above (*)

None of the above

Incorrect. Refer to Section 2 Lesson 9.

21. In Alice,
which of the Mark for Review
following (1) Points
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} (*)

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

True

False (*)

Correct

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

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 Mark for Review
lessons, (1) Points
which type
of
constructor
can be
used to
automate
creation of
Actor
instances?
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? 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.
(*)
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 Mark for Review
inherit the (1) Points
characteristics
of the
subclass they
belong to, but
not the
superclass.
True or false?
True

False (*)

Correct

32. In the following Greenfoot method signature, which is the method


name? Mark for Review
(1) Points
void turnLeft()
()

void

turnLeft (*)
Left
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 Mark for Review
used to call a (1) Points
_____________
from another
class.
Method (*)

Class

Signature

Parameter

Correct

37. In Greenfoot, objects are created from:


Mark for Review
(1) Points
Methods
Classes (*)

Signatures
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 Mark for Review
Greenfoot source code? If (1) Points
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") )
Correct

42. Use your Greenfoot knowledge:


An array object holds a single Mark for Review
variable. True or false? (1) Points
True

False (*)

Incorrect. Refer to Section


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

False

Correct

44. Which of the following are


examples of a Greenfoot Mark for Review
superclass? (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 Mark for Review
actions that will take place in a (1) Points
textual storyboard. True or
false?
True (*)

False

Correct

46. In Greenfoot,
you will not Mark for Review
receive an error (1) Points
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.
47. From your
Greenfoot Mark for Review
lessons, (1) Points
abstraction
techniques can
only be used
once in a class's
source code.
True or false?
True

False (*)

Correct

48. In Greenfoot,
what type of Mark for Review
parameter does (1) Points
the keyDown
method expect?
String (*)

Boolean

Integer

Method

Incorrect.
Refer to
Section 3
Lesson 7.
49. From your
Greenfoot Mark for Review
lessons, how do (1) Points
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.
Correct

50. In Greenfoot, a
way to have all Mark for Review
subclasses of a (1) Points
superclass inherit
a method is by
adding the
method to the
superclass. 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.

Top of Form

Section 2

(Answer all questions in this section)

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


Incorrect. Refer to Section 2 Lesson 14.

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

True (*)

False

Incorrect. Refer to Section 2 Lesson 5.

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)

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,
Mark for Review
distance amount, and time duration. True or false?
(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.
Mark for Review
True or false?
(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?
Mark for Review
(1) Points

(Choose all correct answers)

x (*)

y (*)

z (*)

All of the above

Incorrect. Refer to Section 2 Lesson 2.


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

True (*)

False

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

Code

Scene editor
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
Mark for Review
instructions in the code. True or false?
(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
Mark for Review
with a shark, or move forward if it does not collide with a shark?
(1) Points

(*)
Incorrect. Refer to Section 2 Lesson 8.

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 programming instructions commands the fish to continuously move forward a random speed
Mark for Review
between 0.5 and 1.0 meters, minus 0.25 meters, until it collides with the shark?
(1) Points

(*)
Correct

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

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?


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.


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

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

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)

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
Mark for Review
the Tools menu. True or false?
(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?


Mark for Review
(1) Points

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

True (*)

False

Correct

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)

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?
Mark for Review
(1) Points
Greenfoot.getRandomNumber(30)
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?
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. Refer to Section 3 Lesson 5.


34. When a Greenfoot code segment is executed in an if-statement, each line of code is executed in sequential order. True or
Mark for Review
false?
(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?
Mark for Review
(1) Points

VOID

1 (*)

NULL

Incorrect. Refer to Section 3 Lesson 5.


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

Actor

Greenfoot (*)

GreenfootImage

World
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
Mark for Review
simultaneously. True or false?
(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?
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.

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

(Answer all questions in this section)

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

&

&& (*)

Incorrect. Refer to Section 3 Lesson 10.


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

Square brackets [ ] (*)

Curly brackets { }

Semicolon ;

Colon :
Incorrect. Refer to Section 3 Lesson 10.

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

Incorrect. Refer to Section 3 Lesson 10.

Page 10 of 10

Bottom of Form
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. Nama
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
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

Das könnte Ihnen auch gefallen