Test: Java Fundamentals Midterm Exam
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)
True (*)
False
Correct
Correct
3From your Alice lessons, which of the following is a tool to show the
Mark for
. logic of an animation?
Review
(1) Points
Visual storyboard
Flowchart (*)
Pie chart
Scene editor
Class chart
4In Alice, which function is used to move an object directly to the center
Mark for
. point of another object?
Review
(1) Points
getObject
getDuration
getDepth
getDistance (*)
Correct
6.If you
Mark for Review
want one
(1) Points
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?
True
False (*)
Correct
Correct
True (*)
False
12. From your Alice lessons, variables are fixed and cannot be changed.
Mark for
True or false?
Review
(1) Points
True
False (*)
Correct
(*)
Correct
14. From your Alice lessons, what does the Count control statement do?
Mark for
Review
(1) Points
Correct
15. From your Alice lessons, when testing your animation, you should
Mark for
test that comments were added below each sequence of instructions in
Review
the code. True or false?
(1) Points
True
False (*)
Correct
Section 2
(Answer all questions in this section)
Correct
True
False (*)
Infinite loop
Gallery
Procedure (*)
Scene
Correct
Correct
Correct
2Examine the following code. What are the variables?
Mark for
1.
Review
(1) Points
(Choose all correct
answers)
args
n (*)
i (*)
t
Incorr
ect.
Refer
to
Sectio
n2
Lesso
n 13.
+
/
-
*
%
None of the above
(*)
Corre
ct
Section 3
(Answer all questions in this section)
True (*)
False
Corre
ct
The programming
statements are
executed.
The if-statement is
executed.
The act method is
deleted.
The programming
statements are not
executed. (*)
Corre
ct
True
False (*)
Incorr
ect.
Refer
to
Sectio
n3
Lesso
n6
26.From
Mark for
your
Review
Greenfoot
(1) Points
lessons,
how do
you call a
defined
method?
Correct
Testing
Target (*)
Primary
Programmer
True (*)
False
Correct
Correct
True
False (*)
Correct
31.Using the
Mark for
Greenfoot
Review
IDE, when is
(1) Points
a constructor
automatically
executed?
Correct
32. From your Greenfoot lessons, which of the following is an
Mark for
example of a type of data passed through a parameter?
Review
(1) Points
Methods
Classes
Integers (*)
Scenarios
True
False (*)
Size
Color
Image file
Methods
All of the above (*)
()
void
turnLeft (*)
Left
Correct
36.From your
Mark for
Greenfoot
Review
lessons,
(1) Points
which of the
following is
not a
characteristic
of a static
method?
True (*)
False
Correct
True (*)
False
Correct
39. 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
Correct
Actor
Greenfoot (*)
GreenfootImage
World
Correct
41.From
Mark for
your
Review
Greenfoot
(1) Points
lessons,
which of
the
following
is not a
step to
creating a
new
subclass?
Right-click on a superclass.
Click New subclass...
Name the class.
Select an image for the class.
Program the class to move forward. (*)
True (*)
False
Correct
if (&&isDown ! Greenfoot.isKeyDown("d") )
if (!isDown && Greenfoot.isKeyDown("d") )
if (isDown && Greenfoot.isKeyDown("d") ) (*)
if (!Greenfoot.isKeyDown && isDown("d") )
Correct
4In the following Greenfoot array, what statement would you write to access
Mark for
6.the "a" key?
Review
(1) Points
Keynames = {"a", "b", "c", "d"};
keynames[2]
keynames["a"]
keynames[0] (*)
keynames["a" key]
Correct
1
3 (*)
4
5
6
Correct
4Use your Greenfoot skills to answer the question. What is incorrect in this
Mark for
9.code?
Review
(1) Points
Spacing missing
Curly brace missing
Parenthesis missing (*)
Comma missing
Correct
Correct