Sunteți pe pagina 1din 16

Section 2

1.
In computing, a textual storyboard is called a source co
de: a list of actions to perform a task or solve a problem. True or false?
Mark for Review
(1) Points
True
False (*)

[Incorrect]

Incorrect. Refer to Section 2 Lesson 1.

2.
In Alice, which of the following programming statements
moves the cat backward, half the distance to the bird? Mark for Review
(1) Points
this.Cat move backward {this.Bird getDistanceTo this.Cat / 2}
this.Cat move forward {this.Bird getDistanceTo this.Cat / 2}
this.Bird move forward {this.Bird getDistanceTo this.Cat / 2}
this.Cat move backward {this.Cat getDistanceTo this.Bird / 2} (*)

[Correct]

Correct
3.

Expressions with relational operators produce true and false values. True or fa
lse?
Mark for Review
(1) Points
True (*)
False
[Correct]

Correct

4.
A typical application uses various values and these valu
es continuously change while the program is running. True or false?
Mark for
Review
(1) Points
True (*)

False

[Correct]

Correct

5.
In Alice, which of the following are benefits of separat
ing 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]
Section 2

Correct

6.
In Alice, procedural abstraction is the concept of makin
g code easier to understand and reuse. True or false? Mark for Review
(1) Points
True (*)
False

[Correct]

Correct

7.
In Alice, when a new procedure is declared, all subclass
es of the superclass will inherit the procedure. True or false?
Mark for
Review
(1) Points
True (*)
False

[Correct]

Correct

8.
From your Alice lessons, variables are fixed and cannot
be changed. True or false?
Mark for Review
(1) Points
True
False (*)

[Correct]

Correct

9.
From your Alice lessons, what can be used as a guideline
to ensure your animation fulfills animation principles?
Mark for Review
(1) Points
The Internet
Animation checklist (*)
A close friend
None of the above

[Correct]

Correct

10.
From your Alice lessons, number, boolean, String and obj
ect are all examples of variable types. True or false? Mark for Review
(1) Points
True (*)
False

[Incorrect]

Incorrect. Refer to Section 2 Lesson 8.

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

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

[Correct]

Correct

12.
Main is an example of what in the following code?
public static void main (String[] args) {
System.out.println{"Hello World!");
}
Mark for Review
(1) Points
An instance
A method (*)
A class
A variable

[Incorrect]

Incorrect. Refer to Section 2 Lesson 10.

13.
wing components?
(1) Points

A complete Alice instruction includes which of the follo


Mark for Review
(Choose all correct answers)

Image
Class
Procedure (*)
Direction (*)

Amount (*)

[Incorrect]

Incorrect. Refer to Section 2 Lesson 3.

14.
In Alice, which of the following instructions roll the B
lue Tang fish left 1 meter?
Mark for Review
(1) Points
this.blueTang roll Left 1.0 (*)
this.blueTang Left 1.0
this.blueTang Left 1
this.blueTang roll Left 1

[Correct]

Correct

15.
From your Alice lessons, random numbers are set in the d
istance and duration arguments in a procedure. True or false? Mark for Review
(1) Points
True (*)
False

[Correct]

Correct

Section 2
16.
From your Alice lessons, what is a one-shot procedural m
ethod? Mark for Review
(1) Points
A procedure that is invoked when the Run button is clicked.
A procedure that is used to make a scene adjustment. (*)
A procedure that is dragged into the code editor.
A procedure that is used to launch the program.

[Correct]

Correct

17.
From your Alice lessons, an instance's properties cannot
be modified. True or false?
Mark for Review
(1) Points
True
False (*)

[Incorrect]

Incorrect. Refer to Section 2 Lesson 2.

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

[Correct]

Correct

19.
What Alice tool can be used to diagram the If conditiona
l execution statement? Mark for Review
(1) Points
Cause and effect diagram
Process flow diagram (*)
Conditional flow diagram

[Incorrect]

Incorrect. Refer to Section 2 Lesson 6.

20.
From your Alice lessons, the If control structure can pr
ocess one true and one false response. True or false? Mark for Review
(1) Points

True (*)
False

[Correct]

Correct

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

[Correct]

Correct

22.
In Alice, which of the following arguments are available
to further refine an object's movements?
Mark for Review
(1) Points
(Choose all correct answers)
Object
Distance (*)
Duration (*)
Delay

[Incorrect]

Incorrect. Refer to Section 2 Lesson 5.

23.
From your Alice lessons, where should comments be placed
?
Mark for Review
(1) Points
Above each set of programming statements. (*)
At the end of the program.

In the scene editor.


In their own procedure.

[Correct]

Correct

24.
In Alice, once procedures are added to a control stateme
nt, they cannot be changed. True or false?
Mark for Review
(1) Points
True
False (*)

[Correct]

Correct

25.
In Alice, functions are dragged into the control stateme
nt, not the procedure. True or false? Mark for Review
(1) Points
True
False (*)

[Correct]

Correct

Section 3
26.
Which of the following demonstrates a Greenfoot subclass
/superclass relationship?
Mark for Review
(1) Points
A dog is a subclass of the cat superclass.
A rose is a subclass of the flower superclass. (*)
A computer is a subclass of a video game superclass.
A single person is a superclass of the human subclass.

[Correct]

Correct

27.
In Greenfoot, which of the following are execution contr
ols?
Mark for Review
(1) Points
(Choose all correct answers)
Run (*)
Act (*)
Speed (*)
Move
Turn

[Correct]

Correct

28.
In a Greenfoot if-else statement, if the condition is tr
ue, the if-statement is executed, and then the else-statement is executed. True
or false?
Mark for Review
(1) Points
True
False (*)

[Correct]

Correct

29.
From your Greenfoot lessons, which type of constructor c
an be used to automate creation of Actor instances?
Mark for Review
(1) Points
Animal
World (*)
Actor
Vector

[Incorrect]

Incorrect. Refer to Section 3 Lesson 5.

30.
From your Greenfoot lessons, classes can only use the me
thods they have inherited. They cannot use methods from other classes. True or f
alse? Mark for Review
(1) Points
True
False (*)

[Correct]

Correct

Test: Java Fundamentals Mid Term Exam


Review your answers, feedback, and question scores below. An asterisk (*) indica
tes a correct answer.
Section 3
31.
From your Greenfoot lessons, how do you test that your c
ode does not contain bugs?
Mark for Review
(1) Points
Write the code.
Inspect the instances.
Review the documentation.
Compile the code. (*)

[Correct]

Correct
32.

ng something?
Mark for Review
(1) Points
1

From your Greenfoot lessons, which line of code is missi

3 (*)
4
5
6

[Correct]

Correct

33.
In Greenfoot, you may perform the programming tasks of c
reate and test many times. True or false?
Mark for Review
(1) Points
True (*)
False

[Correct]

Correct

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

[Correct]

Correct

35.
rd has been pressed?
(1) Points

In Greenfoot, which method checks if a key on the keyboa


Mark for Review

keyPress method
keyUp method
keyDown method (*)

keyClick method

[Incorrect]

Incorrect. Refer to Section 3 Lesson 7.

Section 3
36.
In Greenfoot, actor constructors can be used to create i
mages or values and assign them to the variables. True or false?
Mark for
Review
(1) Points
True (*)
False

[Correct]

Correct

37.
When you re-initialize a scenario, Greenfoot automatical
ly displays an instance of the World subclass in the scenario. True or false?
Mark for Review
(1) Points
True (*)
False

[Incorrect]

Incorrect. Refer to Section 3 Lesson 8.

38.
In Greenfoot, an if-statement is used to alternate betwe
en displaying two images in an instance. True or false?
Mark for Review
(1) Points
True
False (*)

[Incorrect]

Incorrect. Refer to Section 3 Lesson 8.

39.
In Greenfoot, a local variable is declared at the beginn
ing of a class. True or false? Mark for Review
(1) Points

True
False (*)

[Incorrect]

Incorrect. Refer to Section 3 Lesson 10.


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

variable?
(1) Points
A
I (*)
X
Y

[Correct]

Correct

Section 3
41.
In Greenfoot, which of the following statements could pr
event an infinite loop from occurring? Mark for Review
(1) Points
I = 100 + i
i=1
i = i
i = i + 1 (*)

[Correct]

Correct

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

False

[Correct]

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

called from?
(1) Points

The world
The act method (*)
The actor class
The gallery

[Incorrect]

Incorrect. Refer to Section 3 Lesson 6.

44.
In Greenfoot, defined methods must be used immediately.
True or false? Mark for Review
(1) Points
True
False (*)

[Correct]

Correct

45.
In the Greenfoot IDE, which of the following is not a pr
operty of an instance? Mark for Review
(1) Points
Position
Inherited methods
Scenario name (*)
Defined methods

[Incorrect]
Section 3
46.

Incorrect. Refer to Section 3 Lesson 2.


What does the following Greenfoot programming statement

do?
turn(18);
(1) Points

Mark for Review

Turn the object 36 degrees.


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

[Correct]

Correct

47.
What type of Greenfoot method would be used to turn an o
bject? Mark for Review
(1) Points
orientTo( );
turnAround( );
move ( );
turn( ); (*)

[Correct]

Correct

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

[Incorrect]

Incorrect. Refer to Section 3 Lesson 9.

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

[Correct]

Correct

50.
an if-statement?
(1) Points

In Greenfoot, what happens if the condition is false in


Mark for Review

The programming statements are executed.


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

[Correct]

Correct

S-ar putea să vă placă și