Java Quiz PDF
Java Quiz PDF
An object's orientation.
Error handling.
Correct
3. What does a visual storyboard help the reader understand? Mark for Review
(1) Points (Choose all correct answers)
The components of the scene. (*)
False
Correct
5. In Alice, which of the following programming statements moves the butterfly
forward, double the distance to the tree? Mark for Review
(1) Points
this.Butterfly move forward {this.Butterfly getDistanceTo this.Tree * 2} (*)
Correct
6. In Alice, we can avoid object collision using what? Mark for Review
(1) Points
Slowing movements down.
False (*)
(*)
Incorrect. Refer to Section 2 Lesson 10.
10. Define the value of the variable LapCount based on the following math calculation:
LapCount + 10 = 15 Mark for Review
(1) Points
2
5 (*)
15
10
11. In Alice, functions are dragged into the control statement, not the procedure. True or false?
Mark for Review
(1) Points
True
False (*)
Correct
12. In Alice, the procedures' arguments allow the programmer to adjust the object,
motion, distance amount, and time duration. True or false? Mark for Review
(1) Points
True (*)
False
Correct
13. In Alice, Do In Order and Do Together: Mark for Review
(1) Points
Are move statements
Are control statements (*)
Correct
14. In Alice, a computer program requires functions to tell it how to perform the
procedure. True or false? Mark for Review
(1) Points
True
False (*)
Scene editor
Storyboard (*)
Scenario
Correct
16. From your Alice lessons, if you examined a science process that had many steps, which of
the following is a way that you could apply functional decomposition to this process? Mark
for Review
(1) Points
1. Present the problem as an animation.
2. Further refine and define the tasks needed for each high level step.
3. Identify the high level steps for the science concept.
Correct
17. Expressions with relational operators produce true and false values. True or false?
Mark for Review
(1) Points
True (*)
False
False
Incorrect. Refer to Section 2 Lesson 8.
21. If you want one 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? Mark for
Review
(1) Points
do loop
while loop
if (*)
if (*)
array
boolean
Variable Assignment
Class
Capitalization
Parenthesis (*)
Comma
False
Correct
27. From your Greenfoot lessons, which of the following is not a characteristic of a
static method? Mark for Review
(1) Points
Belongs to a class itself
Is a method
Correct
28. From your Greenfoot lessons, which axes define an object's position in a world?
Mark for Review
(1) Points (Choose all correct answers)
x (*)
y (*)
World (*)
Actor
Vector
Target (*)
Primary
Programmer
move(2);
turn(38); (*)
turn(38):
False
Correct
33. 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
False (*)
World getWorld()
getXY()
Inherited methods
False
Correct
39. From your Greenfoot lessons, instances do not have any memory. True or false?
Mark for Review
(1) Points
True
False (*)
Class variable
World variable
I (*)
Y
Correct
42. How would the following sentence be written in Greenfoot source code? If Duke's
leg is down, and the keyboard key "d" is down... Mark for Review
(1) Points
if (&&isDown ! Greenfoot.isKeyDown("d") )
&& (*)
findSound method
importSound method
Correct
46. In Greenfoot, which of the following are execution controls? Mark for Review
(1) Points (Choose all correct answers)
Run (*)
Act (*)
Speed (*)
Move
Turn
Correct
48. From your Greenfoot lessons, what is the parameter of the following constructor
that creates a new image, and designates it to the Actor class?
GreenfootImage
duke100.png (*)
new
False
Greenfoot(stop);
Greenfoot.stop( ); (*)
Greenfoot.stop(key);
Section 2
(Answer all questions in this section)
1.A loop can be infinite (continue forever) or conditional (stops
Mark for Review
upon a condition). True or false?
(1) Points
True (*)
False
Correct
2.Which of the following would not be an argument in an Alice
Mark for Review
programming instruction that commands a person object to move
(1) Points
forward 2 meters?
Number of seconds to execute the programming instruction
Direction to move
Distance to move forward
Person's height (*)
Correct
3.In Alice, the setVehicle procedure will associate one object to
Mark for Review
another. True or false?
(1) Points
True (*)
False
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 (*)
Incorrect. Refer to Section 2 Lesson 2.
10. 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
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
Incorrect. Refer to Section 3 Lesson 5.
36. Read the following method signature. Using your Greenfoot experience, what does this
method do?
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
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
Correct
2. From your Alice lessons, which of the following is a
Mark for Review
tool to show the logic of an animation?
(1) Points
Visual storyboard
Flowchart (*)
Pie chart
Scene editor
Class chart
Correct
6.An Alice
Mark for Review
event is
(1) Points
considered
what?
A party with at least 20 people.
An object's orientation.
Error handling.
A keystroke or mouse click. (*)
Correct
9. The say procedure in Alice plays an audio file. True or
Mark for Review
false?
(1) Points
True
False (*)
Correct
12. Identify an example of an Alice
Mark for Review
expression.
(1) Points
"I feel happy."
If or Where
3x3=9 (*)
None of the above
Incorrect. Refer
to Section 2
Lesson 9.
13. In Alice, which of the following
Mark for Review
programming statements moves the cat
(1) Points
backward, half the distance to the bird?
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} (*)
Incorrect. Refer
to Section 2
Lesson 9.
14. In Java, which symbol is used to assign
Mark for Review
one value to another?
(1) Points
<
>
= (*)
//
Incorrect. Refer
to Section 2
Lesson 13.
15. Which of the following is not a valid
Mark for Review
arithmetic operator in Java?
(1) Points
+
/
-
*
%
None of the above (*)
Incorrect. Refer
to Section 2
Lesson 13.
16.The Alice
Mark for Review
IF control
(1) Points
structure
requires
the false
statement
to be
populated.
True or
false?
True
False (*)
Correct
17. Define the value of the variable LapCount based on the
Mark for Review
following math calculation: LapCount + 10 = 15
(1) Points
2
4
5 (*)
15
10
Correct
22. From your Alice lessons, which programming instruction represents
Mark for
the following movement: A turtle moves forward half the distance to
Review
the flower.
(1) Points
this.Turtle move Forward this.Turtle getDistanceTo this.Flower
/ 2.0 (*)
this.Turtle move Forward this.Turtle getDistanceTo this.Flower
/ 0.5
this.Turtle move Forward this.Turtle getDistanceTo this.Flower
/ 1.0
this.Turtle move Forward this.Turtle getDistanceTo this.Flower
*2
Incorrect. Refer to Section 2 Lesson 7.
Section 3
(Answer all questions in this section)
23. Use your Greenfoot knowledge: A specification of a method is
Mark for
called a __________________.
Review
(1) Points
Subclass
Class
Signature (*)
Parameter
Correct
24. From your Greenfoot lessons, which of the following is an example
Mark for
of changing test data during a Q/A test cycle?
Review
(1) Points
Use a different operating system.
Use the mouse instead of the keyboard.
Use symbols instead of numbers. (*)
All of the above.
Method
Conditional (*)
Variable Assignment
Class
Correct
33. Which of the following demonstrates a Greenfoot
Mark for
subclass/superclass relationship?
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.
Incorrect. Refer to Section 3
Lesson 1.
34. From your Greenfoot lessons, the keyDown method is
Mark for
located in which class?
Review
(1) Points
Actor
Greenfoot (*)
GreenfootImage
World
Correct
40. In Greenfoot, a way to have all subclasses of a
Mark for
superclass inherit a method is by adding the method to
Review
the superclass. True or false?
(1) Points
True (*)
False
Correct
41.Use your
Mark for Review
Greenfoot
(1) Points
knowldege:
Abstraction
occurs in
many
different
ways in
programming.
True or false?
True (*)
False
Correct
48. 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
50. In Greenfoot, you will not receive an error message if
Mark for
your code is incorrect. It will simply not work, and you
Review
will have to determine why the code doesn't work. True
(1) Points
or false?
True
False (*)
Correct
Scene Activation/Time
Cursor (*)
Keyboard
Mouse
Position/Orientation
4. A variable is a named location inside the computer's memory; once there, the
information can be retrieved and changed. True or false?
True (*)
False
Correct
Correct
6.InAlice,which
function is
used to move
an object
directly to the
center point of
anotherobject?
getObject
getDuration
getDepth
getDistance (*)
A place in memory where data of a specific type can be stored for later
retrieval and use.
Has a unique name.
Has a type associated with it.
Arranged in rows and columns. (*)
Correct
13. In Alice, which of the following programming statements
moves the cat backward, half the distance to the bird?
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} (*)
Incorrect. Refer to Section 2 Lesson
9.
14. In Alice, which of the following programming statements
moves the butterfly forward, double the distance to the tree?
this.Butterfly move forward {this.Butterfly getDistanceTo
this.Tree * 2} (*)
this.Butterfly move backward {this.Butterfly
getDistanceTo this.Tree * 2}
this.Butterfly move backward {this.Butterfly
getDistanceTo this.Tree / 2}
this.Butterfly move forward {this.Butterfly getDistanceTo
this.Tree / 2}
Correct
15. From your Alice lessons, if you examined a science process
that had many steps, which of the following is a way that you
could apply functional decomposition to this process?
1. Present the problem as an animation.
2. Further refine and define the tasks needed for each high
level step.
3. Identify the high level steps for the science concept.
1. Identify the detailed steps for the science concept.
2. Present the problem as an animation.
1. Present the problem as an animation.
1. Identify the high level steps for the science concept.
2. Further refine and define the tasks needed for each high
level step.
3. Present the problem as an animation. (*)
Incorrect. Refer to Section 2 Lesson
12.
Incorrect.
Refer to
Section 2
Lesson 12.
17. In Alice, declaring a new
procedure to shorten code
and make it easier to read is
a procedural abstraction
technique. True or false?
True (*)
False
Incorrect.
Refer to
Section 2
Lesson 5.
18. From your Alice lessons, a
flowchart could be created
in a software program, or
documented in a journal.
True or false?
True (*)
False
Correct
19. In Alice, which of the
following are benefits of
separating out motions into
their own procedures?
(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. (*)
Incorrect.
Refer to
Section 2
Lesson 5.
20. In Alice, a computer
program requires functions
to tell it how to perform the
procedure. True or false?
True
False (*)
Incorrect.
Refer to
Section 2
Lesson 6.
Incorrect.
Refer to
Section 2
Lesson 6.
22. In Alice, Do In Order and
Do Together:
Are move statements
Are control statements
(*)
Are complex statements
None of the above
Correct
Section 3
(Answer all questions in this section)
23. From your Greenfoot
lessons, which of the
following is an example of
changing test data during a
Q/A test cycle?
Use a different
operating system.
Use the mouse instead
of the keyboard.
Use symbols instead of
numbers. (*)
All of the above.
Incorrect.
Refer to
Section 3
Lesson 12.
24. From your Greenfoot
lessons, what is incorrect in
this code example:
setLocation(getX(), (int)
(altitude);
Spacing
Capitalization
Parenthesis (*)
Comma
Incorrect.
Refer to
Section 3
Lesson 12.
25. In Greenfoot, the image
below is an example of
what construct?
Method
Comment
Constructor (*)
Class
Incorrect.
Refer to
Section 3
Lesson 12.
26. From your
Greenfoot
lessons, to
create a new
instance of the
Duke class, you
right-click on
the class, then
select which of
the following
commands in
the class menu?
New subclass...
Set image...
new Duke() (*)
Inspect
Remove
Correct
27. In Greenfoot, a subclass is created by
right-clicking on a superclass. True or
false?
True (*)
False
Correct
28. From your Greenfoot lessons, the
keyDown method is located in which
class?
Actor
Greenfoot (*)
GreenfootImage
World
Incorrect. Refer to
Section 3 Lesson 7.
29. Which of the following type of audience
should you ask to play your Greenfoot
game during the testing phase?
Testing
Target (*)
Primary
Programmer
Incorrect. Refer to
Section 3 Lesson 4.
30. From your Greenfoot lessons, how do you
test that your code does not contain bugs?
Write the code.
Inspect the instances.
Review the documentation.
Compile the code. (*)
Correct
Incorrect.
Refer to
Section 3
Lesson 10.
32. In Greenfoot, which
Mark for Review
statement is a correct example
(1) Points
of string concatenation?
Duke duke = new
Duke(keyNames[i],
soundNames[i]);
Duke duke =
(keyNames[i],
soundNames[i] +
".wav");
Duke duke = new
Duke(keyNames[i],
soundNames[i] +
".wav"); (*)
Duke duke =
(soundNames[i] +
".wav");
Incorrect.
Refer to
Section 3
Lesson 10.
33. Use your Greenfoot
knowledge to answer the
question: String
concatenation is a way to
avoid having to write
additional characters in your
source code. True or false?
True (*)
False
Correct
34. In Greenfoot, what happens if
the end to a while loop isn't
established?
The code will keep
executing and will never
stop. (*)
The code will execute
once and then stop, due to
controls in Greenfoot.
The code will prompt you
to enter a loop counter.
The code will not
execute.
Incorrect.
Refer to
Section 3
Lesson 10.
35. 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?
True (*)
False
Correct
36. In Greenfoot,
defined methods
must be used
immediately.
True or false?
True
False (*)
Correct
37. In Greenfoot, actor constructors can be
used to create images or values and assign
them to the variables. True or false?
True (*)
False
Correct
38. In Greenfoot, a constructor has a void
return type. True or false?
True
False (*)
Incorrect. Refer to
Section 3 Lesson 8.
39. Which Greenfoot control operator is used
to test if two values are equal?
>= operator
== operator (*)
= operator
!= operator
Correct
40. From your Greenfoot lessons, which of the
following methods return the current
rotation of the object?
World getClass()
World getWorld()
int getRotation() (*)
getXY()
Correct
1.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 Mark for
collides with the shark? Review
(1) Points
(*)
Correct
2. From your Alice lessons, variables are fixed and cannot be changed. True or false?
True
False (*)
Correct
4.
4. From your
Alice lessons, Mark for Review
complete the (1) Points
following
sentence:
When coded,
an event
triggers a
___________.
Infinite loop
Gallery
Procedure (*)
Scene
5. In Alice,
we use Mark for Review
the WHILE (1) Points
control
statement
to
implement
the
conditional
loop. True
or false?
True (*)
False
Correct
6. Which of
the Mark for Review
following (1) Points
is not a
valid
primitive
type in
Java?
boolean
String (*)
long
int
double
7. Results of
arithmetic Mark for Review
operations (1) Points
cannot be
stored in
a variable.
True or
false?
True
False (*)
Correct
8. 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 submethod
A subprogram
An instance (*)
A subclass
A variable class
False
Correct
10. From
your Mark for Review
Alice (1) Points
lessons,
built-in
functions
provide
precise
property
details
for the
following
areas:
Proximity and size.
11. From your Alice lessons, functional decomposition is the process of taking a complex problem or process
and growing it into larger parts that are easier to manage. True or false?
True
False (*)
13. In Alice,
you can Mark for Review
define (1) Points
your own
procedures
for a class,
but not
your own
functions.
True or
false?
True
False (*)
Correct
14. In Alice, a
computer Mark for Review
program (1) Points
requires
functions to
tell it how to
perform the
procedure.
True or false?
True
False (*)
Incorrect.
Refer to
Section 2
Lesson 6.
15. In Alice, the
setVehicle Mark for Review
procedure will (1) Points
associate one
object to
another. True
or false?
True (*)
False
Correct
16. In Alice,
Do In Mark for Review
Order (1) Points
and Do
Together:
Are move statements
False
Correct
18. Before you can begin to develop the animation storyboard, what must be
defined? Mark for Review
(1) Points
The code
19. 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.
21. In Alice,
which of the Mark for Review
following (1) Points
programming
statements
moves the
cat
backward,
half the
distance to
the bird?
this.Cat move backward {this.Bird getDistanceTo this.Cat / 2}
Correct
Correct
Section 3
(Answer all questions in this section)
23. From your Greenfoot lessons, classes can only use the methods they
have inherited. They cannot use methods from other classes. True or Mark for Review
false? (1) Points
True
False (*)
Correct
24. From your Greenfoot lessons, which axes define an object's position in a
world? Mark for Review
(1) Points
(Choose all correct answers)
x (*)
z
y (*)
Correct
Move(120,100);
Correct
World (*)
Actor
Vector
Correct
False (*)
28. Use your Greenfoot knowledge to answer the question: Where are defined
variables typically entered in a class's source code? Mark for Review
(1) Points
In the defined method in the source code.
30. From your Greenfoot lessons, which of the following are properties of an
instance? Mark for Review
(1) Points
Size
Color
Image file
Methods
31. In Greenfoot,
instances Mark for Review
inherit the (1) Points
characteristics
of the
subclass they
belong to, but
not the
superclass.
True or false?
True
False (*)
Correct
void
turnLeft (*)
Left
Incorrect. Refer to Section 3 Lesson 2.
turnAround( );
move ( );
turn( ); (*)
35. From your Greenfoot lessons, source code is written in the Code editor.
True or false? Mark for Review
(1) Points
True (*)
False
Correct
36. In Greenfoot,
dot notation is Mark for Review
used to call a (1) Points
_____________
from another
class.
Method (*)
Class
Signature
Parameter
Correct
Signatures
Parameters
Correct
38. 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
39. In the Greenfoot IDE, what symbols indicate that the variable is an
array? Mark for Review
(1) Points
Square brackets [ ] (*)
Curly brackets { }
Semicolon ;
Colon :
False (*)
Correct
False (*)
False
Correct
Cat
Parrot
Actor (*)
World (*)
False
Correct
46. In Greenfoot,
you will not Mark for Review
receive an error (1) Points
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
false?
True
False (*)
Incorrect.
Refer to
Section 3
Lesson 4.
47. From your
Greenfoot Mark for Review
lessons, (1) Points
abstraction
techniques can
only be used
once in a class's
source code.
True or false?
True
False (*)
Correct
48. In Greenfoot,
what type of Mark for Review
parameter does (1) Points
the keyDown
method expect?
String (*)
Boolean
Integer
Method
Incorrect.
Refer to
Section 3
Lesson 7.
49. From your
Greenfoot Mark for Review
lessons, how do (1) Points
you call a
defined method?
Call the
method
from the act
method. (*)
Call the
method
from the
defined
method.
Write the
method in
the World
superclass.
Write the
method in
the
instance.
Write the
method in
the source
code.
Correct
50. In Greenfoot, a
way to have all Mark for Review
subclasses of a (1) Points
superclass inherit
a method is by
adding the
method to the
superclass. True
or false?
True (*)
False
Correct
Test: Java Fundamentals Midterm Exam
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Top of Form
Section 2
Accept user input and store them in the variables num1 and num2. (*)
3. From your Alice lessons, which of the following are types of storyboards?
Mark for Review
(1) Points
Actual
Textual (*)
Factual
Visual (*)
Fictional
4. In Alice, which of the following is the most likely situation where procedural abstraction could be used?
Mark for Review
(1) Points
Five dogs all need to bark and run at the same time. (*)
5. 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
Top of Form
Section 2
A place in memory where data of a specific type can be stored for later retrieval and
use.
<
// (*)
>
8. In Alice, the procedures' arguments allow the programmer to adjust the object, motion,
Mark for Review
distance amount, and time duration. True or false?
(1) Points
True (*)
False
Correct
9. In Alice, the setVehicle procedure will associate one object to another. True or false?
Mark for Review
(1) Points
True (*)
False
10. In Alice, a computer program requires functions to tell it how to perform the procedure.
Mark for Review
True or false?
(1) Points
True
False (*)
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Top of Form
Section 2
11. All objects in Alice have three dimensional coordinates on which axes?
Mark for Review
(1) Points
x (*)
y (*)
z (*)
13. Functions answer questions about an object, such as its height, width, depth and even distance to another object. True or
Mark for Review
false?
(1) Points
True (*)
False
Correct
14. A complete Alice instruction includes which of the following components?
Mark for Review
(1) Points
Image
Class
Procedure (*)
Direction (*)
Amount (*)
15. What should you refer to for the animation's design specifications as you program your Alice animation?
Mark for Review
(1) Points
Code
Scene editor
Storyboard (*)
Scenario
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Top of Form
Section 2
16. From your Alice lessons, when testing your animation, you should test that comments were added below each sequence of
Mark for Review
instructions in the code. True or false?
(1) Points
True
False (*)
17. Which of the following IF control structures command the blue tang fish to roll and simultaneously move down if it collides
Mark for Review
with a shark, or move forward if it does not collide with a shark?
(1) Points
(*)
Incorrect. Refer to Section 2 Lesson 8.
Color
Decimal Number
Whole Number
Function (*)
(*)
Correct
Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Top of Form
Section 2
21. 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}
An object's orientation.
Error handling.
24. Using Greenfoot, how do we change the size and resolution of the World instance?
Mark for Review
(1) Points
Correct
25. 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 (*)
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Top of Form
Section 3
26. In the Greenfoot IDE, which of the following are components of a parameter?
Mark for Review
(1) Points
Parameter return
Parameter method
Parameter void
27. From your Greenfoot lessons, to view the methods that a class inherits, open the code editor and select documentation from
Mark for Review
the Tools menu. True or false?
(1) Points
True (*)
False
28. From your Greenfoot lessons, instances do not have any memory. True or false?
Mark for Review
(1) Points
True
False (*)
orientTo( );
turnAround( );
move ( );
turn( ); (*)
30. From your Greenfoot lessons, a problem statement defines the purpose for your game. 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.
Top of Form
Section 3
31. Which of the following type of audience should you ask to play your Greenfoot game during the testing phase?
Mark for Review
(1) Points
Testing
Target (*)
Primary
Programmer
Correct
32. Use you Greenfoot knowledge: What range of numbers does the following method return?
Mark for Review
(1) Points
Greenfoot.getRandomNumber(30)
A random number between 1 and 30.
33. From your Greenfoot lessons, which of the following is not a characteristic of a static method?
Mark for Review
(1) Points
Is a method
True (*)
False
35. From your Greenfoot lessons, a comparison operator returns what value when a number meets its requirement?
Mark for Review
(1) Points
VOID
1 (*)
NULL
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Top of Form
Section 3
36. From your Greenfoot lessons, the keyDown method is located in which class?
Mark for Review
(1) Points
Actor
Greenfoot (*)
GreenfootImage
World
Correct
37. 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 (*)
38. From your Greenfoot lessons, in an if-statement, the programming statements written in curly brackets are executed
Mark for Review
simultaneously. True or false?
(1) Points
True
False (*)
Correct
True
False (*)
40. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Top of Form
Section 3
Correct
42. From your Greenfoot lessons, which of the following are examples of Q/A test variations?
Mark for Review
(1) Points
Conditional (*)
Variable Assignment
Class
44. 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
45. Which of the following Java syntax is used to correctly create a Duke subclass?
Mark for Review
(1) Points
private Dog extends World
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Top of Form
Section 3
True (*)
False
47. From your Greenfoot lessons, which of the following logic operators represents "and"?
Mark for Review
(1) Points
&
&& (*)
The code will keep executing and will never stop. (*)
The code will execute once and then stop, due to controls in Greenfoot.
Correct
49. In the Greenfoot IDE, what symbols indicate that the variable is an array?
Mark for Review
(1) Points
Curly brackets { }
Semicolon ;
Colon :
Incorrect. Refer to Section 3 Lesson 10.
50. 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 (*)
Page 10 of 10
Bottom of Form
Tugas 1 Prakarya Dan Kewirausahaan
Nama Produk : Pisang Coklat
Bahan isi:
3 buah pisang raja, potong bulat 1/2 cm
30 g meises coklat
100 g keju cheddar, parut
3. Ambil selembar kulit, tata pisang raja, meises coklat, dan keju
cheddar parut di satu sisi. Lipat dua dan lipat lagi jadi dua.
4. Sajikan.
iii. Modal Awal : Rp. 50.000
v. Keunggulan Produk :
Dibuat Sendiri
Rendah Lemak
Tidak ada bahan pengawet
Higinis
No. Nama
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50