Java Fundamentals Midterm Exam Oracle - Do
Java Fundamentals Midterm Exam Oracle - Do
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
True (*)
False
True
False (*)
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
Correct
8. In Alice, we can avoid object collision using what? Mark for Review
(1) Points
Slowing movements down.
False (*)
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
Class
Procedure (*)
Direction (*)
Amount (*)
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
if
// (*)
>
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
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
keyClick method
Comma missing
Correct
28. In Greenfoot, in which programming task are the objects identified? Mark
for Review
(1) Points
Define the problem.
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 (*)
False
Correct
33. From the Greenfoot IDE, where are inherited methods located? Mark for
Review
(1) Points
In the computer network
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
False (*)
Classes (*)
Scenarios
Objects (*)
False (*)
Correct
41. From your Greenfoot lessons, which of the following logic operators represents "and"?
Mark for Review
(1) Points
&
&& (*)
False (*)
Set image...
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
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
Instance method
World method
Code method