Você está na página 1de 56

Review your answers, feedback, and question scores below.

An asterisk (*) indicates a correct


answer.

Top of Form

1449261704728 0 Y Y 1268065651

Section 2

(Answer all questions in this section)

1 From your Alice lessons, which programming instruction represents the


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

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

Correct

2 Alice objects move relative to the orientation of the person viewing the
Mark for
. animation. True or false?
Review
(1) Points

True

False (*)

Incorrect. Refer to Section 2 Lesson 2.

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

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


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

Bottom of Form

Top of Form

Section 2

(Answer all questions in this section)

6. Which of the following statements about methods is false?


Mark for Review
(1) Points

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


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

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

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

Incorrect. Refer to Section 2 Lesson 14.

7. A loop can be infinite (continue forever) or conditional (stops upon a


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

True (*)

False

Correct

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

9. From your Alice lessons, what does the Count control statement do?
Mark for Review
(1) Points
Executes statements a random number of times.

Executes statements simultaneously.

Executes statements a specific number of times. (*)

Executes statements while a condition is true.

Incorrect. Refer to Section 2 Lesson 4.

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

Section 2

(Answer all questions in this section)

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


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

True

False (*)

Incorrect. Refer to Section 2 Lesson 6.


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

True (*)

False

Correct

13.From your Alice lessons, when testing your animation, you should test
Mark for Review
that comments were added below each sequence of instructions in the
(1) Points
code. True or false?

True

False (*)

Incorrect. Refer to Section 2 Lesson 12.

14.From your Alice lessons, a textual storyboard provides a detailed,


Mark for Review
ordered list of the actions each object performs in each scene of the
(1) Points
animation. True or false?

True (*)

False

Incorrect. Refer to Section 2 Lesson 12.

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

Section 2

(Answer all questions in this section)

1 Which of the following programming instructions commands the fish to


Mark for
6. continuously move forward a random speed between 0.5 and 1.0 meters,
Review
minus 0.25 meters, until it collides with the shark?
(1) Points

(*)
Correct

1 Which of the following is not a reason for why comments are helpful in an Alice
Mark for
7. program?
Review
(1) Points

Comments change the functionality of the program. (*)

Comments describe the intention of the programming instructions.

Comments can outline the programming instructions.

Comments help during debugging and testing so the tester knows how the
programming statements are supposed to work.

Incorrect. Refer to Section 2 Lesson 3.

1 In Alice, which of the following is the most likely situation where procedural
Mark for
8. abstraction could be used?
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

1 From your Alice lessons, inheritance means that the superclass inherits its
Mark for
9. traits from the subclass. True or false?
Review
(1) Points

True

False (*)

Incorrect. Refer to Section 2 Lesson 5.

2 In Alice, you examine code where a bird moves its wings forward and backward
Mark for
0. while moving forward simultaneously across the scene. You notice that this set
Review
of procedures are repeated in the Code editor ten times to achieve this
(1) Points
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.

Section 2

(Answer all questions in this section)

21.If the value already exists in the variable it is overwritten by the


Mark for Review
assignment operator (=). True or false?
(1) Points

True (*)

False

Correct

22.Which of the following is not a relational operator?


Mark for Review
(1) Points

<

// (*)

>

Correct

Section 3

(Answer all questions in this section)


23.Read the following method signature. Using your Greenfoot experience,
Mark for Review
what does this method do?
(1) Points
public static int getRandomNumber (int limit)

Returns a random number less than 10.

Returns a random coordinate position in the world.

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

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

Incorrect. Refer to Section 3 Lesson 5.

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

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

True (*)
False

Correct

Section 3

(Answer all questions in this section)

26.From your Greenfoot lessons, which programming statement creates a


Mark for Review
new Duke object, and places it at x = 120, y = 100 in the world?
(1) Points

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

addClass (new Duke( ), 120, 100);

addWorld (new Duke( ), 120, 100);

Move(120,100);

Correct

27.In Greenfoot, only 10 methods can be written for each class in the Code
Mark for Review
editor. True or false?
(1) Points

True

False (*)

Incorrect. Refer to Section 3 Lesson 3.

28.In Greenfoot, a method with what kind of return type is used to learn
Mark for Review
more about an object's orientation?
(1) Points
non-void return type (*)

void return type

object return type

method return type

Incorrect. Refer to Section 3 Lesson 3.

29.When designing a game in Greenfoot, it helps to define the actions that


Mark for Review
will take place in a textual storyboard. True or false?
(1) Points

True (*)

False

Correct

30.From your Greenfoot lessons, a problem statement defines the purpose


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

True (*)

False

Correct

Section 3

(Answer all questions in this section)

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


Mark for Review
(1) Points
True

False (*)

Correct

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


Mark for Review
method is by adding the method to the superclass. True or false?
(1) Points

True (*)

False

Incorrect. Refer to Section 3 Lesson 6.

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


Mark for Review
subclass?
(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

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

True
False (*)

Incorrect. Refer to Section 3 Lesson 1.

35.In Greenfoot, actor constructors can be used to create images or values


Mark for Review
and assign them to the variables. True or false?
(1) Points

True (*)

False

Correct

Section 3

(Answer all questions in this section)

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


Mark for Review
instance of the World subclass in the scenario. True or false?
(1) Points

True (*)

False

Correct

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

True

False (*)
Incorrect. Refer to Section 3 Lesson 8.

38.What type of parameter does the Greenfoot playSound method expect?


Mark for Review
(1) Points

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

name of an integer (as int)

name of a keyboard key (as String)

name of the class (as String)

Correct

39.From your Greenfoot lessons, to view the methods that a class inherits,
Mark for Review
open the code editor and select documentation from the Tools menu.
(1) Points
True or false?

True (*)

False

Incorrect. Refer to Section 3 Lesson 2.

40.From your Greenfoot lessons, which of the following are properties of an


Mark for Review
instance?
(1) Points

Size

Color

Image file

Methods
All of the above (*)

Correct

Section 3

(Answer all questions in this section)

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


Mark for
Review
(1) Points

orientTo( );

turnAround( );

move ( );

turn( ); (*)

Correct

42.In Greenfoot, instances inherit the characteristics of the subclass they


Mark for
belong to, but not the superclass. True or false?
Review
(1) Points

True

False (*)

Incorrect. Refer to Section 3 Lesson 2.

43.From your Greenfoot lessons, which of the following are examples of


Mark for
abstraction?
Review
(1) Points
(Choose all correct answers)

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

A single instance displays a single image.

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

Programming a single movement for a single instance.

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

Incorrect. Refer to Section 3 Lesson 9.

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


Mark for
loop from occurring?
Review
(1) Points

I = 100 + i

i=1

i=i

i = i + 1 (*)

Incorrect. Refer to Section 3 Lesson 10.

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


Mark for
True or false?
Review
(1) Points

True

False (*)
Incorrect. Refer to Section 3 Lesson 10.

Section 3

(Answer all questions in this section)

4 In the Greenfoot IDE, what symbols indicate that the variable is an array?
Mark for
6.
Review
(1) Points

Square brackets [ ] (*)

Curly brackets { }

Semicolon ;

Colon :

Correct

4 In Greenfoot, when is a local variable most often used?


Mark for
7.
Review
(1) Points

Within the scenario

Within the act method

Within the world constructor

Within loop constructs (*)

Correct

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


Mark for
8.
Review
(1) Points
Define the problem.

Design the solution.

Program the solution. (*)

Test the solution.

Incorrect. Refer to Section 3 Lesson 12.

4 Use your Greenfoot skills to answer the question. What is incorrect in this code?
Mark for
9.
Review
(1) Points

Spacing missing

Curly brace missing

Parenthesis missing (*)

Comma missing

Correct
5 From your Greenfoot lessons, which line of code is missing something?
Mark for
0.
Review
(1) Points

3 (*)

Incorrect. Refer to Section 3 Lesson 12.

n Alice, which function is used to move an object directly to the center point of
another object?
Mark for Review
(1) Points
getObject
getDuration
getDepth
getDistance (*)
Correct
2.
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.
3.
In Alice, the procedures' arguments allow the programmer to adjust the object,
motion, distance amount, and time duration. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
4.
In Alice, the setVehicle procedure will associate one object to another. True or
false?
Mark for Review
(1) Points
True (*)
False
Correct
5.
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
(Answer all questions in this section)
6.
In Alice, which of the following are benefits of separating out motions into their
own procedures?
Mark for Review
(1) Points
(Choose all correct answers)
It makes the animation easier to run.
It makes the scene easier to view.
It simplifies code and makes it easier to read. (*)
It allows many objects of a class to use the same procedure. (*)
It can allow subclasses of a superclass to use a procedure. (*)
Correct
7.
In Alice, procedural abstraction is the concept of making code easier to
understand and reuse. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
8.
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.
9.
In Java, which symbol is used to assign one value to another?
Mark for Review
(1) Points
<
>
= (*)
//
Correct
10.
An Alice event is considered what?
Mark for Review
(1) Points
A party with at least 20 people.
An object's orientation.
Error handling.
A keystroke or mouse click. (*)
Correct
11.
From your Alice
lessons, which of
the following are
reasons why
random numbers
would be used by
a computer?
Mark for Review
(1) Points
(Choose all correct answers)
For opening a project.
For security. (*)
For simulation. (*)
For creating procedures.
Incorrect. Refer to Section 2 Lesson 4.
12.
Identify an example of an Alice expression.
Mark for Review
(1) Points
"I feel happy."
If or Where
3x3=9 (*)
None of the above
Correct
13.
In Alice, which of the following programming statements moves the butterfly
forward, double the distance to the tree?
Mark for Review
(1) Points
this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree * 2} (*)
this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree * 2}
this.Butterfly move backward {this.Butterfly getDistanceTo this.Tree / 2}
this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree / 2}
Correct
14.
Which of the following IF control structures command the blue tang fish to roll and
simultaneously move down if it collides with a shark, or move forward if it does not
collide with a shark?
Mark for Review
(1) Points
(*)
Correct
15.
Which of the following is a reason why you might disable programming statements
in your Alice code?
Mark for Review
(1) Points
To help isolate portions of code during testing. (*)
To make an object move forward.
To make an object turn and move simultaneously.
To disable the entire program.
Correct
16.
All objects in Alice
have three
dimensional
coordinates on
which axes?
Mark for Review
(1) Points
(Choose all correct answers)
x (*)
y (*)
z (*)
w
All of the above
Correct
17.
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
Incorrect. Refer to Section 2 Lesson 12.
18.
Which of the following are examples of elements you would test in your Alice
animation?
Mark for
Review
(1) Points
(Choose all correct answers)
All of the procedures display in alphabetical order in the Procedures tab.
Math expressions calculate as expected. (*)
Objects move with smooth timing. (*)
Event listeners trigger the correct responses. (*)
Incorrect. Refer to Section 2 Lesson 12.
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
(*)
Incorrect. Refer to Section 2 Lesson 10.
20.
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
21.
When you want
specific code to be
executed only if
certain conditions
are met, what type
of Java construct
would you use?
Mark for Review
(1) Points
while loop
if (*)
array
boolean
Correct
22.
Which of the following statements about methods is false?
Mark for
Review
(1) Points
Classes must be defined directly within a method definition. (*)
Methods whose return type is not void are required to include a return statement
specifying what to return.
The order in which methods are listed within the class is not important.
Java does not permit nesting one method definition within another method's
definition.
Correct
Section 3
(Answer all questions in this section)
23.
From your Greenfoot lessons, where do you review a class's inherited methods?
Mark for
Review
(1) Points
Act method
Documentation (*)
Inspector
If-statement
Incorrect. Refer to Section 3 Lesson 3.
24.
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
25.
In Greenfoot, the image below is an example of what construct?
Mark for
Review
(1) Points
Method
Comment
Constructor (*)
Class
Correct
26.
In Greenfoot,
objects are
created from:
Mark for Review
(1) Points
Methods
Classes (*)
Signatures
Parameters
Correct
27.
From your Greenfoot lessons, what is incorrect in this code example:
setLocation(getX(), (int) (altitude);
Mark for Review
(1) Points
Spacing
Capitalization
Parenthesis (*)
Comma
Correct
28.
Use your Greenfoot knowldege: Abstraction occurs in many different ways
in programming. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
29.
In the Greenfoot IDE, which of the following is not a property of an
instance?
Mark for Review
(1) Points
Position
Inherited methods
Scenario name (*)
Defined methods
Correct
30.
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
31.
In the Greenfoot
IDE, which of the
following are
components of a
parameter?
Mark for Review
(1) Points
(Choose all correct answers)
Parameter type (*)
Parameter return
Parameter name (*)
Parameter method
Parameter void
Correct
32.
In the following Greenfoot method signature, which is the method name?
void turnLeft()
Mark for Review
(1) Points
()
void
turnLeft (*)
Left
Correct
33.
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
34.
From your Greenfoot lessons, to create a new instance of the Duke class,
you right-click on the class, then select which of the following commands
in the class menu?
Mark for Review
(1) Points
New subclass...
Set image...
new Duke() (*)
Inspect
Remove
Correct
35.
Using the Greenfoot IDE, which of the following programming statements
tells the object to turn 38 degrees?
Mark for Review
(1) Points
move():
move(2);
turn(38); (*)
turn(38):
Correct
36.
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
37.
In Greenfoot, which statement is a correct example of string concatenation?
Mark for Review
(1) Points
Duke duke = new Duke(keyNames[i], soundNames[i]);
Duke duke = (keyNames[i], soundNames[i] + ".wav");
Duke duke = new Duke(keyNames[i], soundNames[i] + ".wav"); (*)
Duke duke = (soundNames[i] + ".wav");
Correct
38.
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
39.
From your Greenfoot lessons, what is a loop?
Mark for Review
(1) Points
A statement that executes one segment of code.
A statement that can execute a section of code multiple times. (*)
A statement that can execute a section of code one time.
A statement that can execute a method multiple times.
Correct
40.
From your Greenfoot lessons, what types of values cannot be stored in a
local variable?
Mark for Review
(1) Points
(Choose all correct answers)
Class name
Objects
Integers
World name
method (*)
Correct
41.
In Greenfoot,
defined methods
Mark for Review
(1) Points
must be used
immediately. True
or false?
True
False (*)
Correct
42.
From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points
Call the method from the act method. (*)
Call the method from the defined method.
Write the method in the World superclass.
Write the method in the instance.
Write the method in the source code.
Correct
43.
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
44.
From your Greenfoot lessons, dot notation allows you to use a method
from a different class, if the class you are programming does not
possess the method. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
45.
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.
46.
In a Greenfoot if-
else statement, if
the condition is
true, the if-
statement is
executed, and
then the else-
statement is
executed. True or
false?
Mark for Review
(1) Points
True
False (*)
Correct
47.
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
Correct
48.
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
49.
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.
Correct
50.
In Greenfoot, an if-statement is used to alternate between displaying two
images in an instance. True or false?
Mark for Review
(1) Points
True

False (*)
Correct

http://ilearning.oracle.com/ilearn/en/learner/jsp/player.jsp?rco_id=1340347665&classroom_id=136
1817065&scorm_attempt=1449257615852&sessionId=-
14766555111449257615858&home_url=http%3A%2F%2Filearning.oracle.com%2Filearn%2Fen%2Fle
arner%2Fjsp%2Foffering_details_home.jsp%3Fclassid%3D1361817065

Você também pode gostar