Anda di halaman 1dari 16

Section 2

1. In computing, a textual storyboard is called a source code: 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
false?

Mark for Review


(1) Points
True (*)
False

[Correct] Correct

4. A typical application uses various values and these values


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 separating 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] Correct
Section 2

6. In Alice, procedural abstraction is the concept of making 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 subclasses 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 object 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. A complete Alice instruction includes which of the following


components? Mark for Review
(1) Points

(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 Blue 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 distance
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 method?


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 conditional


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 process 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 statement 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 statement, 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 statement, 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 controls?


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 true, 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 can 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 methods
they have inherited. They cannot use methods from other classes. True or false?
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 (*) indicates
a correct answer.
Section 3

31. From your Greenfoot lessons, how do you test that your code does
not contain bugs? Mark for Review
(1) Points

Write the code.

Inspect the instances.

Review the documentation.

Compile the code. (*)

[Correct] Correct

32. From your Greenfoot lessons, which line of code is missing


something?
Mark for Review
(1) Points

3 (*)

[Correct] Correct

33. In Greenfoot, you may perform the programming tasks of create 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 false?
Mark for Review
(1) Points

True

False (*)

[Correct] Correct

35. In Greenfoot, which method checks if a key on the keyboard has


been pressed? Mark for Review
(1) Points
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 images 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 automatically


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 between


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 beginning 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 variable?
Mark for Review
(1) Points

I (*)

[Correct] Correct

Section 3

41. In Greenfoot, which of the following statements could prevent 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 class. True
or false? Mark for Review
(1) Points

True (*)

False

[Correct] Correct

43. To execute a method in your Greenfoot game, where is it called


from? Mark for Review
(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 property of


an instance? Mark for Review
(1) Points
Position

Inherited methods

Scenario name (*)

Defined methods

[Incorrect] Incorrect. Refer to Section 3 Lesson 2.


Section 3

46. What does the following Greenfoot programming statement do?

turn(18); Mark for Review


(1) Points

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 object?


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. In Greenfoot, what happens if the condition is false in an if-


statement? Mark for Review
(1) Points

The programming statements are executed.

The if-statement is executed.

The act method is deleted.

The programming statements are not executed. (*)

[Correct] Correct