Test
Test
Test
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
1. In Greenfoot, you will not receive an error 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 Mark for Review
false? (1) Points
True
False (*)
True
False (*)
3. In the Greenfoot IDE, an instance's position is on the x and y coordinates. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
4. Using the Greenfoot IDE, only five instances can be added to a scenario. True or false?
Mark for Review
(1) Points
True
False (*)
Correct
5. In Greenfoot, the move method expects what type of information in its parameters?
Mark for Review
(1) Points
String statement
Integer of steps to move forward (*)
True or false response
Degrees to turn
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Turn
Speed (*)
Act (*)
Run (*)
Move
Correct
7. In Greenfoot, the class holds the general attributes of an instance, such as the
methods it inherits. True or false? Mark for Review
(1) Points
True (*)
False
Correct
8. In Greenfoot, after a subclass is created, what has to occur before instances can be
added to the scenario? Mark for Review
(1) Points
Compilation (*)
Creation of source code
Creation of an instance
Editing of source code
9. Which of the following Java syntax is used to correctly create a Bee subclass?
Mark for Review
(1) Points
True (*)
False
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
11. 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 (*)
Correct
12. An if-else statement executes its first code block if a condition is true, and its second
code block if a condition is false, but not both. True or false? Mark for Review
(1) Points
True (*)
False
Correct
13. 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
15. Which of the following comparison operators represents "greater than or equal"?
Mark for Review
(1) Points
!=
>
==
>= (*)
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Correct
2. In Greenfoot, the origin of the world coordinate system (0,0) starts in the center of the
world. True or false? Mark for Review
(1) Points
True
False (*)
Correct
3. From your Greenfoot lessons, which type of constructor can be used to automate
creation of Actor instances? Mark for Review
(1) Points
Animal
Vector
Actor
World (*)
Correct
True (*)
False
Correct
True (*)
False
Correct
Test: Section 3 Quiz 1 - L1-L5
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
6. 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
Correct
8. 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 (*)
Correct
9. In Greenfoot, a method with what kind of return type is used to learn more about an
object's orientation? Mark for Review
(1) Points
Correct
10. From your Greenfoot lessons, which of the following methods return the current
rotation of the object? Mark for Review
(1) Points
World getClass()
getXY()
int getRotation() (*)
World getWorld()
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
11. In object oriented programming, programmers analyze a problem and create objects
to solve the problem. True or false? Mark for Review
(1) Points
True (*)
False
Correct
12. In Greenfoot, the turn method expects what type of information in its parameters?
Mark for Review
(1) Points
String statement
True or false response
Degrees to turn (*)
Integer of steps to move forward
Parameter void
Correct
13. In Greenfoot, methods can be called in the act method. When the Act button is clicked
in the environment, the methods in the method body of the act method are executed. Mark for Review
True or false? (1) Points
True (*)
False
Correct
14. In the Greenfoot IDE, an instance's position is on the x and y coordinates. True or
false? Mark for Review
(1) Points
True (*)
False
Correct
Field (*)
Instance
Method
Syntax
Class
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 2
(Answer all questions in this section)
1.What type of Alice listener object is required to target a mouse-click on any object in the
scene, allowing the user to drag that object around the scene when the animation is Mark for
running? Review
(1) Points
addDefaultManipulation procedure
addListener procedure
addDefaultModelManipulation procedure (*)
addMouseListener procedure
True (*)
False
3.A conditional loop is a loop that will continue forever. True or false?
Mark for
Review
(1) Points
True
False (*)
Select the result from the following statements about what happens when the loopVal >=
5.
The message "Printing Some Text" will be printed until loopVal is no longer less than
5.
The variable loopVal is initialized to 0.
The condition loopVal < 5 is tested before executing anything further in the program.
(*)
The condition loopVal < 5 returns a boolean value.
None of the above.
Correct
5.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 subclass
A variable class
A submethod
A subprogram
An instance (*)
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 2
(Answer all questions in this section)
6. The comments you enter in Alice should describe the sequence of actions that take
place in the code segment. True or false? Mark for Review
(1) Points
True (*)
False
Correct
Hello World
3
True or False (*)
An object
Correct
8. 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
9. In Java, which symbol is used to assign one value to another?
Mark for Review
(1) Points
= (*)
<
>
//
Correct
Size argument
Duration argument (*)
Get Distance functions (*)
If control
Amount argument (*)
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 2
(Answer all questions in this section)
3*3=9 (*)
Move forward 1 meter
If or Where
"I feel happy."
Correct
12. In Alice, which of the following programming statements moves the butterfly forward,
double the distance to the tree? Mark for Review
(1) Points
13. Which Alice execution task corresponds with the following storyboard statement?
<br>Cat rolls to the left. Mark for Review
(1) Points
Correct
14. Creating multiple versions of your Alice project saves time. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
15. In Alice, a walking motion for a bipedal object can be achieved without the Do
Together control statement. True or false? Mark for Review
(1) Points
True
False (*)
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 2
(Answer all questions in this section)
16. In Alice, which of the following is not a control statement?
Mark for Review
(1) Points
Move (*)
Count
Do In Order
While
Correct
Correct
18. A textual storyboard helps the reader understand the actions that will take place
during the animation. True or false? Mark for Review
(1) Points
True (*)
False
Code
Program
Class (*)
Project
Correct
20. 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
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)
21. An event is any action initiated by the user that is designed to influence the programメs
execution during play. Mark for Review
(1) Points
True (*)
False
Correct
22. When creating an event based on a keypress which event handler would you use?
Mark for Review
(1) Points
Mouse
Position/Orientation
Scene Activation/Time
Keyboard (*)
Correct
23. Functions answer questions about an object, such as its height, width, depth and even
distance to another object. True or false? Mark for Review
(1) Points
True (*)
False
Correct
24. One type of object property is an object's position in the scene. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
Section 3
(Answer all questions in this section)
True
False (*)
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 3
(Answer all questions in this section)
26. From your Greenfoot lessons, which of the following comparison operators represents
"greater than"? Mark for Review
(1) Points
!=
> (*)
<
==
Correct
27. 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
28. In Greenfoot, the origin of the world coordinate system (0,0) starts in the center of
the world. True or false? Mark for Review
(1) Points
True
False (*)
Correct
29. An if-statement requires which type of information returned from the condition?
Mark for Review
(1) Points
Integer
Method
Action
True or false (*)
Correct
30. 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
Test: Java Fundamentals Midterm Exam
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 3
(Answer all questions in this section)
31. In Greenfoot what command would you use to detect if a mouse has been clicked on
an actor? Mark for Review
(1) Points
Greenfoot.pressed(this)
Greenfoot.mouseClicked(this) (*)
Actor.clicked(this)
Greenfoot.clicked(this)
Correct
32. In Greenfoot, which class has methods that allow you to get the status of the mouse?
Mark for Review
(1) Points
World
Greenfoot (*)
Scenario
Actor
Correct
34. Using the Greenfoot IDE, only five instances can be added to a scenario. True or false?
Mark for Review
(1) Points
True
False (*)
Correct
35. In Greenfoot, the body of the method is located in between which of the following
characters? Mark for Review
(1) Points
Correct
Test: Java Fundamentals Midterm Exam
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 3
(Answer all questions in this section)
36. In Greenfoot, the move method expects what type of information in its parameters?
Mark for Review
(1) Points
Degrees to turn
Integer of steps to move forward (*)
True or false response
String statement
Correct
37. In Greenfoot, the turn method expects what type of information in its parameters?
Mark for Review
(1) Points
Correct
38. In Greenfoot, constructors can be used to create new instances of objects. True or
false? Mark for Review
(1) Points
True (*)
False
Correct
39. 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
40. In Greenfoot, we typically use the act method in the class to automatically create the
Actor instances when the world is initialized. True or false? Mark for Review
(1) Points
True
False (*)
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 3
(Answer all questions in this section)
41. When a program is tested once and it works then testing is complete.
Mark for Review
(1) Points
True
False (*)
42. 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
43. In Greenfoot, which of the following statements could prevent an infinite loop from
occurring? Mark for Review
(1) Points
i = 100 + i
i=i
i=1
i = i + 1 (*)
44. How would the following sentence be written in Greenfoot source code? If Bee is
turning, and the keyboard key "d" is down... Mark for Review
(1) Points
if (!Greenfoot.isKeyDown && isTurning("d") )
if (&&isTurning ! Greenfoot.isKeyDown("d") )
if (!isTurning && Greenfoot.isKeyDown("d") )
if (isTurning && Greenfoot.isKeyDown("d") ) (*)
Correct
True
False (*)
Correct
Test: Java Fundamentals Midterm Exam
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 3
(Answer all questions in this section)
Correct
47. Which one of the following can be used to detect when 2 actors collide?
Mark for Review
(1) Points
isContact()
isCollision()
hasCollided()
isTouching() (*)
Correct
48. A collision in Greenfoot is when two actors make contact?
Mark for Review
(1) Points
True (*)
False
Correct
49. In Greenfoot, after a subclass is created and compiled, you cannot edit the subclass's
source code. True or false? Mark for Review
(1) Points
True
False (*)
Correct
50. In Greenfoot, the Run button repeatedly executes all of the programming statements
in the class's act method in sequential order until the pause button is clicked. True or Mark for Review
false? (1) Points
True (*)
False
Correct