Sie sind auf Seite 1von 12

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)
1. In Alice, we can avoid object collision using what?

Slowing movements down.


Using math operators. (*)
Downloading the Alice 3 collision detector app.
Using object detection.
Incorrect. Refer to Section 2 Lesson 9.

2. In Alice, which of the following programming statements moves the fish forward,

this.Fish move forward {this.Rock getDistanceTo

this.Fish move forward {this.Fish getDistanceTo th


this.Fish move forward {this.Rock getDistanceTo

this.Rock move forward {this.Rock getDistanceTo


Incorrect. Refer to Section 2 Lesson 9.

3. In Alice, the setVehicle procedure will associate one object to another. True or fal

True (*)
False
Correct

4. In Alice, a computer program requires functions to tell it how to perform the proc

True
False (*)

Correct

5. Which of the following actions would require a control statement to control anim

(Choose all correct answers)


A biped object walking. (*)
A rock object turning.
A fish swimming. (*)
A bird flying. (*)
Incorrect. Refer to Section 2 Lesson 6.
Page 1 of 10

Next

Summary

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)

6. What tool can be used to diagram an IF conditional execution statemen

Cause and effect diagram


Process flow diagram (*)
Conditional flow diagram
Incorrect. Refer to Section 2 Lesson
7. All objects in Alice have three dimensional coordinates on which axes?

(Choose all correct answers)


x (*)
y (*)
z (*)

w
All of the above
Incorrect. Refer to Section 2 Lesson
8. If you want one message to display if a user is below the age of 18 and

for all loop


do loop
while loop
if (*)
Correct
9. Which of the following statements about methods is false?

Classes must be defined directly within a

Methods whose return type is not void a

The order in which methods are listed w

Java does not permit nesting one metho


Incorrect. Refer to Section 2 Lesson

10. Which Alice execution task corresponds with the following storyboard st
Cat turns to face mouse.
this.mouse turnToFace this.cat
mouse turnTo cat
this.cat turnToFace this.mouse (*)
cat TurnTo mouse
Incorrect. Refer to Section 2 Lesson

Previous

Page 2 of 10

Test: Java Fundamentals Midterm Exam

Next

Summary

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 2
(Answer all questions in this section)
11. In Alice, procedural abstraction is the concept of making code easier to

True (*)
False
Correct

12. In Alice, which of the following are benefits of separating out motions in

(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

It allows many objects of a class to use t

It can allow subclasses of a superclass to


Incorrect. Refer to Section 2 Lesson

13. In Alice, if a procedure is declared for a clownFish class, which classes c

The clownFish class and Swimmer class


ClownFish class (*)

The pajamaFish class, clownFish class, a


Any class with "Fish" in the class name
Incorrect. Refer to Section 2 Lesson

14. In Alice, you can define your own procedures for a class, but not your ow

True

False (*)
Incorrect. Refer to Section 2 Lesson
15. Which of the following is not a type of event listener in Alice?

Scene Activation/Time
Cursor (*)
Keyboard
Mouse
Position/Orientation
Incorrect. Refer to Section 2 Lesson

Previous

Page 3 of 10

Next

Summary

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)

16. From your Alice lessons, when testing your animation, you should test that c

True
False (*)

Incorrect. Refer to Section 2 Lesson 1

17. From your Alice lessons, if you examined a science process that had many s

1.
2.
3.
1.
2.
1.

Present the problem as an animation.


Further refine and define the tasks needed
Identify the high level steps for the science
Identify the detailed steps for the science
Present the problem as an animation.
Present the problem as an animation.

1. Identify the high level steps for the science


2. Further refine and define the tasks needed
3. Present the problem as an animation. (*)
Correct
18. Examine the following code. What are the variables?

(Choose all correct answers)


args
n (*)
i (*)
t

Incorrect. Refer to Section 2 Lesson 1


19. Which of the following is not a valid arithmetic operator in Java?

+
/
*
%
None of the above (*)

Incorrect. Refer to Section 2 Lesson 1

20. From your Alice lessons, built-in functions provide precise property details fo

Proximity and size.


Distance to and nesting.

Proximity, size, spatial relation, and point of v


Proximity and point of view.

Incorrect. Refer to Section 2 Lesson 7

Previous

Page 4 of 10

Next

Summary

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. Which of the following programming instructions commands the fish to continuo

(*)

Correct

22. Define the value of the variable LapCount based on the following math calculati

2
4
5 (*)
15
10
Correct

Section 3
(Answer all questions in this section)

23. Use your Greenfoot knowledge to answer the question: String concatenation is a

True (*)
False
Correct

24. From your Greenfoot lessons, what is a loop?

A statement that executes one segment of code.

A statement that can execute a section of code m

A statement that can execute a section of code o

A statement that can execute a method multiple


Correct
25. In Greenfoot, what is a common letter used for the loop variable?

A
I (*)
X
Y
Correct

Previous

Next

Page 5 of 10

Summary

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)

26. From your Greenfoot lessons, which symbol represents string concatena

Symbol &
Symbol <
Symbol =
Symbol + (*)
Incorrect. Refer to Section 3 Lesson

27. In Greenfoot, a subclass is created by right-clicking on a superclass. Tru

True (*)
False
Correct
28. From your Greenfoot lessons, the reset button resets the scenario back

True (*)
False
Incorrect. Refer to Section 3 Lesson
29. To execute a method in your Greenfoot game, where is it called from?

The world
The act method (*)
The actor class
The gallery
Correct
30. From your Greenfoot lessons, to save space in the act method, you can

Class method
Instance method
Defined method (*)
World method
Code method
Correct

Previous

Page 6 of 10

Next

Summary

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. From your Greenfoot lessons, how do you test that your code does not c

Write the code.


Inspect the instances.
Review the documentation.
Compile the code. (*)
Incorrect. Refer to Section 3 Lesson

32. In Greenfoot, you will not receive an error message if your code is incor

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

33. In Greenfoot, a variable can be saved and accessed later, even if the ins

True
False (*)
Correct

34. In the Greenfoot IDE, which of the following are components of a param

(Choose all correct answers)


Parameter type (*)
Parameter return

Parameter name (*)


Parameter method
Parameter void
Incorrect. Refer to Section 3 Lesson

35. From your Greenfoot lessons, when a method needs additional data to p

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

Previous

Page 7 of 10

Next

Summary