Professional Documents
Culture Documents
com/programacion-orientada-a-objetos-1-java-mvc-espanol/
http://www.javahispano.org/portada/2013/1/6/arquitectura-java-solida-libro-gratuito-de-jee-en-espaol.html
http://www.tutomundi.org/2009/03/java-desde-cero-manual-super-practico.html
http://cs.joensuu.fi/jeliot/
http://www.compunauta.com/forums/linux/programacion/java/ebook.html
enlace POO
https://www.google.com.co/?gws_rd=cr&ei=zG08UoyeDJC68wTA2oGQCA#q=descargar+gratis+libro+de+programaci
on+orientada+a+objetos+en+java
http://www.etnassoft.com/biblioteca/introduccion-a-la-programacion-orientada-a-objetos-con-java/
http://librosgratis.net/
http://www.identi.li/index.php?topic=109351
http://www.freelibros.com/programacion/programacion-orientada-a-objetos-con-java-3ra-edicion.html
http://www.intercambiosvirtuales.org/libros-manuales/programacion-orientada-a-objetos-con-java-3era-edicionprentice-hall
http://espanol.answers.yahoo.com/question/index?qid=20110403075155AA6NBva
SQL
C++
Java (*)
All of the above
Correct
3. The Oracle Academy Java Fundamentals and Java Programming courses
help you prepare for what exam?
Verdadero (*)
Falso
Correct
7. Oracle iLearning is used to access everything in the course except what?
Quizzes
Slides
Exams
Java IDE (*)
Correct
8. What is the learning management system used in this course?
Alice 3
Greenfoot
iLearning (*)
BlueJ
Eclipse
Correct
9. What does IDE stand for in this course?
(1) Puntos
Writing code
Compiling code
Editing code
Debugging programs
All of the above (*)
Correct
11.Why is teamwork important?
Verdadero (*)
Falso
Correct
1 only
2 only
3 only
1, 2, and 3
2 and 3 only (*)
Correct
3. Which of the following steps is not needed to generate an animation in Alice or to create a game
in Greenfoot?
Test
Implement
Import graphical objects (*)
Create a scenario
Design a storyboard
Correct
4. When designing the scenario for a game or animation, what questions should you answer?
Shared responsibility
Clear roles
Clearly defined tasks
Regular participation
A single leader (*)
Correct
6. Which of the following components can help a team be successful?
1. A common goal
2. Shared responsibility
3. A project plan clearly defining roles and tasks
4. Equal participation and attendance at all meetings
1 only
1 and 2 only
1, 2, and 3 only
1, 2, 3, and 4 (*)
Correct
7. In a team assessment rubric, which of the following would earn a 4 (the highest score) in the
Collaboration category?
Rarely listens to, shares with, and supports the efforts of others. Often is not a good team
player.
Almost always listens to, shares with, and supports the efforts of others. Tries to keep
people working well together and mentors team members when appropriate. (*)
Usually listens to, shares, with, and supports the efforts of others. Does not cause "waves"
in the group.
Often listens to, shares with, and supports the efforts of others, but not always.
Correct
8. In a team assessment rubric, which of the following would earn a 1 (the lowest score) in the
attitude category?
Is often publicly critical of the project or the work of other members of the group. Is often
negative about the task(s). (*)
Is rarely publicly critical of the project or the work of others. Often has a positive attitude
about the task(s).
Is never publicly critical of the project or the work of others. Always has a positive attitude
about the task(s).
Is occasionally publicly critical of the project or the work of other members of the group.
Usually has a positive attitude about the task(s).
Correct
9. The following provides examples of a team rubric, except which one?
1 only
2 only
2 and 3 only
1, 2, and 3 (*)
Correct
11. What kind of information is useful in a programming journal?
Copying and pasting parts of someone elses work into your own without giving them
credit.
Posting information about people at school that they would never want shared.
Pretending you are someone else in an online chat room.
Starting a cruel social network page about members of the community.
Refraining from using rude or bad language online. (*)
Correct
File
New
Save As... (*)
Open
Correct
4. Alice 3 will periodically remind you to save your project. True or false?
Verdadero
Falso (*)
Correct
5. In Alice, once an instance is added to the scene, it cannot be deleted. True or false?
Verdadero
Falso (*)
Correct
6. When is an instance created in Alice?
Verdadero (*)
Falso
Correct
8. After objects are positioned in the scene, it is wise to save multiple versions of the
project, giving each version the same name. True or false?
(1) Puntos
Verdadero
Falso (*)
Correct
9. How do you create a programming instruction in Alice?
Click and drag the desired programming instruction into the Procedures tab.
Click and drag the desired programming instruction into the myFirstMethod tab. (*)
Click and drag the desired programming instruction into the Scene editor.
Click and drag the desired programming instruction into the Functions tab.
10. How do you view the results of procedures entered in the Alice code editor?
Verdadero (*)
Falso
Correct
12. Which option copies a programming instruction to the clipboard?
Clipboard
Is Enabled
Copy to Clipboard (*)
Paste
Correct
13. When something is broken or doesn't work as intended in a software program, it is
referred to as a _________?
Bug (*)
Debug
Error
Code
Correct
14. Debugging is the process of finding bugs in a software program. True or false?
Verdadero (*)
Falso
Correct
Verdadero (*)
Falso
Correct
2. Which of the following are ways to open an existing Alice project file after launching Alice?
Correct
4. In Alice, there is a limit of 10 objects per scene. True or false?
Verdadero
Falso (*)
Correct
5. In Alice, what does the resize handle style do?
Verdadero
Falso (*)
Correct
7. Which of the following is not an example of a one-shot procedure?
Roll
Move
Turn
Spin (*)
Correct
8. Only acting objects have one-shot procedures. True or false?
Verdadero
Falso (*)
Correct
9. When you edit an object's properties in the Scene editor, the changes do not take effect until the
Run button is clicked. True or false?
Verdadero
Falso (*)
Correct
10. One type of object property is an object's position in the scene. True or false?
Verdadero (*)
Falso
Correct
11. Which of the following is not one of the positioning axes used in Alice 3?
x
z
w (*)
y
Correct
12. In Alice, where does an instance's axes intersect?
Rotation (*)
Default
Translation
Resize
Correct
14. Rings will appear around a sub-part indicating how you can reposition it. True or false?
Verdadero (*)
Falso
Correct
Verdadero (*)
Falso
Correct
3. In Alice the Functions tab will display the pre-defined functions for the selected instance.
True or false?
Verdadero (*)
Falso
Correct
4. The Procedures tab and the Functions tab are the two tabs available in the Alice
methods panel. True or false?
Verdadero (*)
Falso
Correct
5. Which of the following instructions turns the clown fish left 5 meters?
turn
turnToFace (*)
orientToUpright
moveToward
Correct
7. Which of the following is the default control statement in myFirstMethod?
Count
Do Together
Do In Order (*)
Comment
Correct
8. To add a procedure to myFirstMethod, right-click on the procedure you wish to add and
select the Add button. True or false?
Verdadero
Falso (*)
Correct
9. The Alice move procedure contains which arguments?
10. An argument is a value that the procedure uses to complete its task. True or false?
Verdadero (*)
Falso
Correct
11. Programming comments do not affect the functionality of your Alice animation. True or
false?
Verdadero (*)
Falso
Correct
12. What is the first step to entering comments in an Alice program?
Type comments that describe the sequence of actions in the code segment.
Drag and drop the comments tile above a code segment. (*)
Drag and drop the comments tile below a code segment.
Select the instance from the instance menu.
Correct
13. Which of the following ways can you alter a procedure in Alice?
Verdadero
Falso (*)
Correct
15. After each execution of your Alice animation, what element or elements could be
adjusted in your code?
Control statements
Procedures
Arguments
All of the above (*)
Correct
16. It is important to save often while debugging your program. True or false?
Verdadero (*)
Falso
Correct
Together
Do together (*)
Do in order
While
2.Which Alice execution task corresponds with the following storyboard
statement?
Cat rolls to the left.
roll Left 1
this.Cat roll Left 1.0 (*)
Cat roll Left 1
Cat roll Right 1
3.In Alice, control statements are dragged into the Code editor. True or
false?
Verdadero (*)
Falso
4.In Alice, the while control statement executes a set of procedures a
specific number of times. True or false?
Verdadero
Falso (*)
5.In Alice, the computer specifies the low and high range values for the
range of numbers from which to pull a randomized number. True or
false?
Verdadero
Falso (*)
6.In Alice, which of the following arguments could be replaced with a
random number?
A person to help.
A system to start.
2. An animation gives the scenario a purpose. True or false?
Verdadero
Falso (*)
3. Breaking down a problem or process into smaller parts makes it
easier to manage. True or false?
Verdadero (*)
Falso
4. A textual storyboard helps the reader understand the actions that will
take place during the animation. True or false?
Verdadero (*)
Falso
5. Which Alice tool is used to demonstrate the process flow of an
animation?
Visual storyboard
Textual storyboard
Flowchart (*)
World
Pie chart
6. A flowchart is a useful way to illustrate how your Alice animation's
characters will look. True or false?
Verdadero
Falso (*)
7. From your Alice lessons, what does inheritance mean?
subclass.
Each subclass inherits the methods and properties of its
superclass. (*)
Each class has its own methods and properties that are nontransferable to any other class.
8. Which of the following would a clown fish object in Alice inherit
from its class?
Fins
Two eyes
Procedures
Functions
All of the above (*)
9. Procedural abstraction may need to be implemented if an object in
Alice needs to perform an action, but there isn't an inherited
procedure that accomplishes that action. True or false?
Verdadero (*)
Falso
10.Which of the following is a reason why procedural abstraction may
be used in programming an animation?
Verdadero
Falso (*)
12.In Alice, you could identify when new procedures need to be
declared by reviewing the textual storyboard for the animation. True
or false?
Verdadero (*)
Falso
Quadruped (*)
Biped
Swimmer
Prop
Do In Order
While
Count
Move (*)
2.In Alice, which control statement is used to invoke simultaneous
movement?
Do Together (*)
Do In Order
While
Count
Variable
3.In Alice, a walking motion for a bipedal object can be achieved
without the Do Together control statement. True or false?
Verdadero
Falso (*)
4.In Alice, different programming is not required for different objects,
because all objects move the same way. True or false?
Verdadero
Falso (*)
5.In Alice, when two objects are synchronized and move together, this
means that one object is:
Verdadero
Falso (*)
Verdadero (*)
Falso
2.The Alice If control structure requires the false statement to be
populated. True or false?
Verdadero
Falso (*)
3.A conditional loop is a loop that will continue forever. True or false?
Verdadero
Falso (*)
4.In Alice, we use the While control statement to implement the
conditional loop. True or false?
(1) Puntos
Verdadero (*)
Falso
Add
Subtract
Multiply
Divide
All of the above (*)
3.In Alice, which of the following programming statements moves the
alien backward the distance to the asteroid, minus 2 meters?
x
3
Hello World
True or False (*)
An object
2.The initializer of a variable with a TextString value type could be
(select all that apply):
2.Event listeners look for and resopnd to the interactivity of the computer.
True or false?
Verdadero
Falso (*)
Verdadero
Falso (*)
2. In Alice, what are the forms of a
scenario?
Verdadero (*)
Falso
5. Which of the following elements of the
Alice animation should be tested before
the animation is considered complete?
Verdadero (*)
Falso
7. 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 running?
addDefaultManipulation procedure
addMouseListener procedure
addDefaultModelManipulation
procedure (*)
addListener procedure
8. In which Alice class is the
addDefaultModelManipulation procedure
located?
Object class
Verdadero (*)
Falso
10.When presenting your Alice animation, it
is not important to give the audience a
reason to listen to the presentation. True
or false?
Verdadero
Falso (*)
Marcar para
Revisin
(1) Puntos
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. (*)
2. Examine the following code. What are the variables?
Marcar para
Revisin
(1) Puntos
args
n
i
t
All of the above are variables. (*)
3. The following are examples of what in Java?
boolean
byte
char
short
int
long
float
double
Marcar para
Revisin
(1) Puntos
Types (*)
Expressions
Variables
Specifications
4. The list below displays valid primitive types in Java, except which one?
boolean
String (*)
long
Marcar para
Revisin
(1) Puntos
int
double
5. The list below displays valid arithmetic operators in Java, except which one?
Marcar para
Revisin
(1) Puntos
+
/
*
% (*)
6. Results of arithmetic operations cannot be stored in a variable. True or false?
Marcar para
Revisin
(1) Puntos
Verdadero
Falso (*)
7. Expressions with relational operators produce true and false values. True or
false?
Marcar para
Revisin
(1) Puntos
Verdadero (*)
Falso
8. What is the result of the following code?
x>y:x>y
Marcar para
Revisin
(1) Puntos
x<y:x<y
x>y:1
x<y:0
x>y:0
x<y:1
x > y : true
x < y : false (*)
x > y : false
x < y : true
9. If a value has been assigned to (is stored in) a variable, that value will be
overwritten when another value is assigned to the variable using the
assignment = operator. True or false?
Marcar para
Revisin
(1) Puntos
Verdadero (*)
Falso
10What is the output produced by the following code?
.
Marcar para
Revisin
(1) Puntos
j is 5
k is 5 (*)
j is 10
j is 5
k is 5
j is 10
k is 10
j is 15
k is 15
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
An instance
A method (*)
A class
A variable
3. You have a Class representing Cat. A cat can meow, purr, catch mice, and so
on. When you create a new cat, what is it called?
Marcar para
Revisin
(1) Puntos
A submethod
A subprogram
An instance (*)
A subclass
A variable class
4. You want a block of code to be executed only once if certain conditions are
met. What type of Java construct would you use?
Marcar para
Revisin
(1) Puntos
while loop
if (*)
array
boolean
5. 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?
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
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. (*)
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
Verdadero
Falso (*)
10What do lines 7, 10 and 13 do in the following code?
.
Marcar para
Revisin
(1) Puntos
x
x
x
import java.awt.*;
import java.buffer.*;
import java.io.*; (*)
import java.io.input.*;
Marcar para
Revisin
(1) Puntos
Verdadero (*)
Falso
3.An object is an instance of a class. True or false?
Verdadero (*)
Falso
4.In Greenfoot, the class holds the general attributes of an instance, such
as the methods it inherits. True or false?
Verdadero (*)
Falso
"for-what"
"a-is"
"is-a" (*)
"is-by"
6.What does an instance of the World class do?
Creation of an instance
Compilation (*)
Creation of source code
Editing of source code
8.In Greenfoot, after a subclass is created and compiled, you cannot edit
the subclass's source code. True or false?
Verdadero
Falso (*)
Degrees to turn
True or false response
String statement
Integer of steps to move forward (*)
2. In Greenfoot, the turn method expects what type of information in its
parameters?
Verdadero
Falso (*)
4. In Greenfoot, the instance has a source code editor. True or false?
Verdadero
Falso (*)
5. In the Greenfoot IDE, an instance's position is on the x and y
coordinates. True or false?
Verdadero (*)
Falso
6. In Greenfoot, which of the following options are not possible when
associating an image file with an instance?
Add a video (*)
Draw an image
Import an image
Select an image from the Greenfoot library
Verdadero
Falso (*)
8. A variable is also known as a ____________.
Instance
Class
Field (*)
Syntax
Method
9. In Greenfoot, the body of the method is located in between which of
the following characters?
Parnetheses ( )
Curly brackets { } (*)
Square brackets [ ]
Asterisks **
10.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. True or false?
Verdadero (*)
Falso
be removed?
Write source code to tell the
class how to act in the scenario.
Review the class's inherited
methods and properties. (*)
Write and edit source code.
Write and edit comments.
2.The list below displays components
of the Greenfoot source code editor
except one. Which one should be
removed?
Documentation
Comments
Method body
Instance creator (*)
Class description
3.In a Greenfoot if-statement, the
programming statements that the ifstatement executes are written in
curly brackets. True or false?
Verdadero (*)
Falso
4.An if-statement requires which type
of information returned from the
condition?
Integer
Action
True or false (*)
Method
5.In Greenfoot, which of the
following methods display an
object's orientation?
(Seleccione todas las respuestas
correctas)
void move()
World getClass()
World getWorld() (*)
getRotation()
getXY()
move(): (*)
move(2);
turn(25);
turn(2);
2.Which of the following features of Greenfoot will teach you how to
identify bugs in your program?
Code editor
Compilation (*)
Instance creation
Documentation
3.In object oriented programming, programmers analyze a problem and
create objects to solve the problem. True or false?
Verdadero (*)
Falso
Greenfoot.getRandomNumber(10,000)
Greenfoot.getRandomNumber(10,001) (*)
Greenfoot.getRandomNumber(9,999)
Greenfoot.getRandomNumber(0-10,000)
2. What does the following Greenfoot programming statement tell the
class to do?
if (Greenfoot.getRandomNumber(100) < 6) { turn(18); }
!=
4. In Greenfoot you can use comparison operators to compare a
variable to a random number. True or false?
Verdadero (*)
Falso
5. 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?
Verdadero (*)
Falso
6. The first step to executing an if-else statement is to:____________.
world
constructor
super (*)
addObject
new
object-name.method-name(parameters); (*)
class-name.method-name(parameters);
Method-name.object-name(parameters);
Method-name.object-name;
10.In Greenfoot, a semicolon is not necessary at the end of a method
that uses dot notation. True or false?
Verdadero
Falso (*)
11.In Greenfoot, the origin of the world coordinate system (0,0) starts in
the center of the world. True or false?
Verdadero
Falso (*)
12.Which keyword indicates that Greenfoot needs to create a new
object?
new (*)
addObject
newObject
newClass
Verdadero (*)
Falso
2.In reference to Greenfoot, if the following method was defined in a
superclass,
(1) Puntos
Verdadero (*)
Falso
2.You cannot record unique sounds in Greenfoot. You can only use the
sounds that are stored in the Greenfoot library. True or false?
Verdadero
Falso (*)
3.What type of parameter does the keyDown method expect?
Section 1
(Responder todas las preguntas de esta seccin)
1. In Greenfoot, which method body correctly adds an instance of the
World to a scenario, with size x = 300 y = 300 and a resolution of 2
pixels per cell?
Verdadero
Falso (*)
3. Which of the following Greenfoot programming statements creates a
new instance of Duke, and places him at x = 140, y = 130 in the
world?
addObject
add
new (*)
super
5. Which of the following is the correct syntax for declaring a variable
in Greenfoot?
(Seleccione todas las respuestas correctas)
public variable-type variable-name; (*)
private variable-name, variable-type;
public variable-name variable type;
<
== (*)
>
!>
8. In Greenfoot, the == operator is used to test if two values are equal.
True or false?
Verdadero (*)
Falso
9. The GreenfootImage class enables Greenfoot actors to maintain their
visible image by holding an object of type GreenfootImage. True or
false?
Verdadero (*)
Falso
10.What does the following programming statement mean?
image1 = new GreenfootImage("duke12.png);
The variable, image1, cannot use the image file, duke12.png.
The image file, duke12.png, has just been drawn and imported
into the scenario.
The image file, duke12.png, is assigned to the variable image1.
(*)
Image files from 1-119 are associated with image1.
Class.stop( );
Greenfoot.stop( ); (*)
Duke.stop( );
Game.stop(1);
12.Where can we review the available classes and methods in
Greenfoot, including the stop method?
Class menu
Object menu
Class Application Programmers' Interface (API)
Greenfoot Application Programmers' Interface (API) (*)
Verdadero (*)
Falso
Local variable
Control operator
Loop variable
if statement (*)
while keyword
3. If an end to a while loop is not established, what happens?
Verdadero (*)
Falso
5. An array is an object that holds multiple methods. True or false?
Verdadero
Falso (*)
6. In Greenfoot, arrays are a way to hold and access multiple variables,
and assign different values to new instances each time the while loop
(1) Puntos
Verdadero (*)
Falso
7. Which of the following Greenfoot logic operators represents "not"?
&
&&
=
! (*)
8. In the Greenfoot IDE, what does the AND operator (&&) do?
Verdadero
Falso (*)
10.In Greenfoot, what types of values cannot be stored in a local
variable?
Class name
Objects
Integers
World name
Method (*)
11.In Greenfoot, string concatenation reduces the number of redundant
characters or phrases you need to type into each array. True or false?
Verdadero (*)
Falso
12.Which of the following is an example of string concatenation?
Instead of entering ".png" after each image file name, add &&
".png" after the imageName value in the programming statement.
Instead of entering ".png" after each image file name, add =
".png" after the imageName value in the programming statement.
Instead of entering ".png" after each image file name, add +
".png" after the imageName value in the programming statement.
(*)
Instead of entering ".png" after each image file name, add ".png"
after the imageName value in the programming statement.
Marcar par
Conditional (*)
Repetition
Obsolete
Rewind
2.From your Greenfoot lessons, the __________ control structure is often referred to as loops.
Marcar par
Conditional
Repetition (*)
Obsolete
Rewind
3.The construct listed below is described as a __________________.
/**
Marcar par
Marcar par
termvar = scanterm.nextLine();
Method
Comment
Variable Assignment (*)
Instruction
5.What is wrong with the following line of code?
Marcar par
System.out.println(termvar+; +termdef);
There are parenthesis instead of brackets.
There are parenthesis instead of curly braces.
There are single quotes instead of double quotes. (*)
The command is incorrectly capitalized.
Nothing is wrong with the code.
6.Which line of code contains a syntax error?
2
3 (*)
4
5
Marcar par
6
7.In which step to create a Greenfoot game do you find and resolve errors in the game?
Marcar par
Marcar par
Marcar par
Marcar par
Section 2
(Responder todas las preguntas de esta seccin)
1. Before you can begin to develop the animation storyboard, what must be defined?
The code
The debugging process
The scenario (*)
The control statements
2. From your Alice lessons, inheritance means that the superclass inherits its traits from the subclass. True o
Verdadero
Falso (*)
3. In Alice, objects inherit the characteristics of their:
Code
Project
Class (*)
Program
4. From your Alice lessons, what is a one-shot procedural method?
to control
animation timing?
(Seleccione todas las respuestas correctas)
A biped object walking. (*)
A rock object turning.
A fish swimming. (*)
A bird flying. (*)
7. In Alice, a computer program requires functions to tell it how to perform the procedure. True or
Verdadero
Falso (*)
8. An Alice event is considered what?
Falso (*)
18. Which of the following is not a reason for why comments are helpful in an Alice
program?
Comments change the functionality of the program. (*)
Comments describe the intention of the programming instructions.
Comments can outline the programming instructions.
Comments help during debugging and testing so the tester knows how the
programming statements are supposed to work.
19. If the value already exists in the variable it is overwritten by the assignment
operator (=). True or false?
Verdadero (*)
Falso
20. Which of the following is not a valid primitive type in Java?
boolean
String (*)
long
int
double
21. From your
Alice
lessons,
variables
are fixed
and cannot
be
changed.
True or
false?
Verdadero
Falso (*)
22. Which of the following programming instructions commands the fish to continuously move forward a ra
between 0.5 and 1.0 meters, minus 0.25 meters, until it collides with the shark?
(*)
Section 3
(Responder todas las preguntas de esta seccin)
23. In Greenfoot, what happens if the condition is false in an if-statement?
25. Which of the following type of audience should you ask to play your Greenfoot game during the testing
Testing
Target (*)
Primary
Programmer
26. When
designing a
game in
Greenfoot, it
helps to
define the
actions that
will take
place in a
textual
storyboard.
True or false?
Verdadero (*)
Falso
27. What type of parameter does the Greenfoot playSound method
expect?
name of a sound file (as String) (*)
name of an integer (as int)
name of a keyboard key (as String)
Verdadero (*)
Falso
29. From your Greenfoot lessons, a scenario is a game or
simulation implemented in Greenfoot. True or false?
Verdadero (*)
Falso
30. Use your Greenfoot knowldege: Abstraction occurs in many
different ways in programming. True or false?
Verdadero (*)
Falso
31. In Greenfoot, the
properties of an
instance can be
modified in the
documentation.
True or false?
Verdadero
Falso (*)
32. What type of Greenfoot method would be used to turn an
object?
orientTo( );
turnAround( );
move ( );
turn( ); (*)
33. In the Greenfoot IDE, which type of variable allows
instances to store information?
Method variable
Instance variable (*)
Class variable
World variable
34. From your Greenfoot lessons, to view the methods that a
class inherits, open the code editor and select
documentation from the Tools menu. True or false?
Verdadero (*)
Falso
35. In Greenfoot, a local variable is declared at the beginning
of a class. True or false?
Verdadero
Falso (*)
36. 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.
37. From your Greenfoot lessons, which symbol represents string
concatenation?
Symbol &
Symbol <
Symbol =
Symbol + (*)
38. In a Greenfoot loop constructor, which component is a
counter that controls how many times the statement is
executed?
Local loop
While loop
Loop variable (*)
Condition
39. In Greenfoot, objects are created from:
Methods
Classes (*)
Signatures
Parameters
40. From your Greenfoot lessons, what is incorrect in this code
example:
Verdadero
Falso (*)
44. Use your Greenfoot knowledge to answer the question: Where
are defined variables typically entered in a class's source code?
addClass
addWorld
addObject (*)
addInstance
46. From your
Greenfoot
lessons,
where
should the
stop method
be inserted
into the
source
code?
World (*)
Actor
Vector
48. From your Greenfoot lessons, which axes define an object's
position in a world?
Verdadero (*)
Falso
50. Use you Greenfoot knowledge: What range of numbers does the
following method return?
Greenfoot.getRandomNumber(30)
A random number between 1 and 30.
A random number between 0 and 30.
A random number between 0 and 29. (*)
A random number between 1 and 29.
Verdadero
Falso (*)
2. Eclipse provides an edit area to help you navigate a hierarchy of information.
True or False?
Verdadero
Falso (*)
3. Eclipse provides views to help you navigate a hierarchy of information. True
or False?
Verdadero (*)
Falso
4. Tabs are used when more than one file is open in the edit area. True or
False?
Verdadero (*)
Falso
5. A perspective is described as:
Perspective
Workspace (*)
Editor
None of the above
7. A workspace can have one or more stored projects. True or false?
Verdadero (*)
Falso
8. Identify the components in the image below.
Verdadero (*)
Falso
10.A _______________ is used to organize Java related files.
Project
Workspace
Package (*)
Collection
11.You need to _______________ Java code to generate a .class file
Collect
Compile (*)
Package
Assemble
12.In a project, 2 of the classes must contain a main method. True or False?
Verdadero
Falso (*)
13.For every opening curly brace { there must be a closing curly brace} or the
program will not compile without error. True or False?
Verdadero (*)
Falso
14.Semi-colons at the end of each line are not required to compile successfully.
True or False?
Verdadero
Falso (*)
15.What symbols are required for a compiler to ignore a comment?
// (*)
/*
*/
/*/
16.When converting gallons to liters its best to put the calculation result into a
variable with a _______________ data type.
int
double (*)
boolean
None of the above
17.Two variables are required to support a conversion of one unit of measure to
another unit of measure. True or False?
Verdadero (*)
Falso
Marcar para
Revisin
(1) Puntos
Example A
Example B (*)
2When importing another package into a class you must import the entire package
. as well as the package classes that will be called. True or False?
Marcar para
Revisin
(1) Puntos
Verdadero
Falso (*)
3Which of the following defines a driver class?
Marcar para
Revisin
(1) Puntos
Contains a main method and other static methods. (*)
Contains classes that define objects.
Contains a main method, a package, static methods, and classes that define
objects.
None of the above.
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
Defines where this class lives relative to other classes, and provides a level of
access control. (*)
Provides the compiler information that identifies outside classes used within
the current class.
Precedes the name of the class.
6The following defines an import keyword:
.
Marcar para
Revisin
(1) Puntos
Defines where this class lives relative to other classes, and provides a level of
access control.
Provides the compiler information that identifies outside classes used within
the current class. (*)
Precedes the name of the class.
7The following defines a class keyword:
.
Defines where this class lives relative to other classes, and provides a level of
access control.
Marcar para
Revisin
(1) Puntos
Provides the compiler information that identifies outside classes used within
the current class.
Precedes the name of the class. (*)
Marcar
para Revisin
(1) Puntos
0 (*)
4.375
0.175
280
2What is the output of the following lines of code?
.
int j=7,k=5,m=8,result;
result=j-k%3*m;
System.out.println(result);
Marcar
para Revisin
(1) Puntos
0
16
2
-9 (*)
3Which of the following is not correct Java code?
.
double x=Math.sqrt(16);
double x=Math.pow(3,4)*5.0;
double x=Math.PI*5.0;
double x=Math.pow; (*)
Marcar
para Revisin
(1) Puntos
4Which line of Java code assigns the value of 5 raised to the power of 8 to a?
.
Marcar
para Revisin
(1) Puntos
double a=15^8;
double a=Math.pow(5,8); (*)
int a=Math.pow(8,5);
int a=Math.pow(5,8);
double a=pow(8,5);
5Write a declaration statement that will hold a number like 2.541.
.
Marcar
para Revisin
(1) Puntos
char number;
int number;
float number; (*)
boolean number;
6Which of the following is the name of a Java primitive data type?
.
Marcar
para Revisin
(1) Puntos
String
int (*)
Rectangle
Object
7Which of the following is not a legal name for a variable?
.
Marcar
para Revisin
(1) Puntos
R2d2
dgo2sleep
4geeks (*)
to_be_or_not_to_be
8Which of the following examples of Java code is not correct?
.
Marcar
para Revisin
(1) Puntos
int x=6;
double d=4.5;
boolean b=1; (*)
char c='r';
9Which of the following statements correctly assigns "3 times 10 to the 4th power" to the
. variable number?
Marcar
para Revisin
(1) Puntos
double number=3*10^4;
double number=3(e4);
double number=3e4; (*)
double number=3*10e4;
1Which line of code does not assign 3.5 to the variable x?
0
.
Marcar
para Revisin
(1) Puntos
double x=3.5
x=3.5;
3.5=x; (*)
x=7.0/2.0;
1Consider the following:
1
. You are writing a class and are using a global variable. Inside a method you declare a
local variable with the same name as the global variable.
Marcar
para Revisin
(1) Puntos
This programming style is poor because inside the method the global variable will have
precedence over the local variable with the same name.
True or false?
Verdadero
Falso (*)
1What will the method methodA print to the screen?
2
.
Marcar
para Revisin
(1) Puntos
18 (*)
15
6
3
1Which line of Java code properly calculates the volume of a cone using
3
.
where r and h are Java primitive integers?
Marcar
para Revisin
(1) Puntos
double V=1/3*3.14*r*r*h;
double V=(double)1/3*Math.PI*Math.pow(r,2)*h; (*)
double V=1/3*Math.PI*Math.pow(r,2)*h;
double V=(double)1/3*Math.PI*Math.pow(2,r)*h;
double V=1/3*3.14*r(2)*h;
1Given the following declaration: int z=5,m=6;
4
. Which line of Java code properly casts one type into another without data loss?
double x=(double)z/m; (*)
double x=z/m;
double x=(double)(z/m);
double x= double z/m;
Marcar
para Revisin
Marcar
para Revisin
(1) Puntos
(1) Puntos
6 (*)
7
8
Hudson
river
2Which of the following creates a String reference named str and
. instantiates it?
Marcar
para Revisin
(1) Puntos
String str;
str="str";
String s="str";
String str=new String("str"); (*)
3Declaring and instantiating a String is much like any other type of
. variable. However, once instantiated, they are final and cannot be
changed. True or false?
Marcar
para Revisin
(1) Puntos
Verdadero (*)
Falso
4Which of the following statements declares a String object called
. name?
Marcar
para Revisin
(1) Puntos
Marcar
para Revisin
(1) Puntos
s1 <= s2
s1.compareTo(s2); (*)
int m = s1.length(); (*)
6Consider the following code snippet. What is printed?
.
Marcar
para Revisin
(1) Puntos
PoliiPolii (*)
Polii
auaacauaac
auaac
ArrayIndexOutofBoundsException is thrown
7What will the following code segment output?
.
Marcar
para Revisin
(1) Puntos
"\\\\\"
\"\\\\\"
"\\" (*)
"\\\"
8What will the following code segment output?
.
""\\"
""\"
""\
" (*)
"""\
""
""\
""
Marcar
para Revisin
(1) Puntos
Marcar
para Revisin
(1) Puntos
Verdadero (*)
Falso
1Which of the following creates a String named string?
0
.
Marcar
para Revisin
(1) Puntos
char string;
String s;
String string; (*)
String String;
String char;
1Given the code below, which of the following would equate to true?
1
. String s1 = "yes";
String s2 = "yes";
String s3 = new String(s1);
Marcar
para Revisin
(1) Puntos
Marcar
para Revisin
(1) Puntos
1The == operator can be used to compare two String objects. The result
Marcar
3is always true if the two strings are identical. True or false?
para Revisin
.
(1) Puntos
Verdadero
Falso (*)
1The following program prints "Equal". True or false?
4
.
Marcar
para Revisin
(1) Puntos
Verdadero
Falso (*)
1Given the code below, which of the following calls are valid?
5
. String s = new String("abc");
Marcar
para Revisin
(1) Puntos
Marcar
para Revisin
(1) Puntos
0
2
3 (*)
11
12
1Consider the following code snippet. What is printed?
7
Marcar
para Revisin
(1) Puntos
55555
87668 (*)
AtlanticPacificIndianArcticSouthern
The code does not compile.
An ArrayIndexOutofBoundsException is thrown.
1Consider the following code snippet. What is printed?
8
.
Marcar
para Revisin
(1) Puntos
55555
87658
AtlanticPacificIndianArcticSouthern
The code does not compile.
An ArrayIndexOutofBoundsException is thrown. (*)
Marcar para
Revisin
(1) Puntos
0
3 (*)
4
5
2.Which of the following correctly initializes an instance of Scanner, called "in", that
reads input from the console screen?
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
Example A (*)
Example B
4.In an if-else construct, the condition to be evaluated must be contained within
parentheses. True or False?
Marcar para
Revisin
(1) Puntos
Verdadero (*)
Falso
5.The six relational operators in Java are:
>,<,=,!,<=,>=
>,<,=,!=,=<,=>
>,<,=,!=,<=,>=
Marcar para
Revisin
(1) Puntos
>,<,==,!=,<=,>= (*)
6.Determine whether this boolean expression evaluates to true or false:
!(3<4&&5>6||6<=6&&7-1==6)
Marcar para
Revisin
(1) Puntos
Verdadero
Falso (*)
7.The three logic operators in Java are:
Marcar para
Revisin
(1) Puntos
!=,=,==
&&, ||, ! (*)
&&,!=,=
&,|,=
8.What is the difference between the symbols = and == ?
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
Verdadero (*)
Falso
1The following code fragment properly implements the switch statement. True or
0.false?
default(input)
switch '+':
answer+=num;
break;
case '-':
Marcar para
Revisin
(1) Puntos
answer-=num;
break;
!default
System.out.println("Invalid input");
Verdadero
Falso (*)
1How would you use the ternary operator to rewrite this if statement?
1.
if (skillLevel > 5)
numberOfEnemies = 10;
else
numberOfEnemies = 5;
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
Verdadero (*)
Falso
3. Which of the following are types of loops in Java?
Taking coins out of a pile one at a time and adding their value to the
total until there are no more coins in the pile to add.
Attending class while school is not over for the day.
Petting each animal at the pet store one at a time until all the animals
have been petted.
All of the above. (*)
6. What is one significant difference between a while loop and a do-while
loop?
(1) Puntos
There is no difference between a DO-WHILE loop and a WHILE loop.
A DO-WHILE loop does not exist in Java and a WHILE loop does.
A DO-WHILE loop includes an int that serves as a counter and a
WHILE loop does not.
A DO-WHILE loop will always execute the code at least once, even if
the conditional statement for the WHILE is never true. A WHILE loop is
only executed if the conditional statement is true. (*)
7. A counter used in a for loop cannot be initialized within the For loop
statement. True or False?
Verdadero
Falso (*)
8. The syntax below represents a valid initialization of a for loop counter. True
or False?
Verdadero
Falso (*)
10.In a for loop, the counter is automatically incremented after each loop
iteration. True or False?
Verdadero
Falso (*)
11.Which of the following correctly initializes a for loop that executes 5 times?
for(int i = 0; i == 6; i++)
for(int i = 1; i < 6; i++) (*)
for(int i = 0; i < 5; I++)
for(int i = 1; i < 5; I++)
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
Verdadero (*)
Falso
3. Which of the following declares a one dimensional array named "score" of type
int that can hold 9 values?
Marcar para
Revisin
(1) Puntos
int score;
int[] score;
int[] score=new int[9]; (*)
int score=new int[9];
4. Which of the following declares and initializes a one dimensional array named
words of size 10 so that all entries can be Strings?
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
222220
0 (*)
220
2
This code does not compile.
7. What is the output of the following segment of code?
Marcar para
Revisin
(1) Puntos
1286864
643432
262423242322
666666 (*)
This code does not compile.
8. Which of the following declares and initializes a two dimensional array named
values with 2 rows and 3 columns where each element is a reference to an
Marcar para
Revisin
Object?
(1) Puntos
String[][] values={"apples","oranges","pears"};
String[][] values=new String[3][2];
String[][] values=new String[2][3]; (*)
String[][] values;
9. Which of the following declares and initializes a two dimensional array where
each element is a reference type?
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
Marcar para
Revisin
(1) Puntos
753
6
7766554433221
7531 (*)
This code does not compile.
12The following creates a reference in memory named y that can refer to five
. different integers via an index. True or false?
int[] y = new int[5];
Marcar para
Revisin
(1) Puntos
Verdadero (*)
Falso
13The following creates a reference in memory named z that can refer to seven
. different doubles via an index. True or false?
double z[] = new double[7];
Marcar para
Revisin
(1) Puntos
Verdadero (*)
Falso
14What is the output of the following segment of code if the command line
. arguments are "apples oranges pears"?
Marcar para
Revisin
(1) Puntos
apples
pears (*)
oranges
args
This code does not compile.
15What is the output of the following segment of code if the command line
. arguments are "apples oranges pears"?
Marcar para
Revisin
(1) Puntos
0
1
2
3 (*)
This code does not compile.
16What will be the content of array variable table after executing the following
. code?
Marcar para
Revisin
(1) Puntos
000
000
000
100
010
0 0 1 (*) la correcta
1 0 0 no es correcta
110
111
001
010
100
17What is the output of the following segment of code?
.
Marcar para
Revisin
(1) Puntos
1286864 (*)
643432
262423242322
666666
This code does not compile.
18After execution of the following statement, which of the following are true?
.
int number[] = new int[5];
number[0] is undefined
number[4] is null
number[2] is 0 (*)
Marcar para
Revisin
(1) Puntos
number.length() is 6
19The following array declaration is valid. True or false?
.
int x[] = int[10];
Marcar para
Revisin
(1) Puntos
Verdadero
Falso (*)
Verdadero
Falso (*)
4. Which of the following sort algorithm was used to sort the char array {'M',
'S', 'A', 'T', 'H'}. The steps are shown below: {'M', 'S', 'A', 'T', 'H'} {'M', 'A',
'S', 'T', 'H'} {'A', 'M', 'S', 'T', 'H'} {'A', 'M', 'S', 'H', 'T'} {'A', 'M', 'H', 'S', 'T'}
Verdadero
Falso (*)
6. Selection sort is a sorting algorithm that involves finding the minimum value
in the list, swapping it with the value in the first position, and repeating these
steps for the remainder of the list. True or false?
Verdadero (*)
Falso
7. Binary searches can be performed on sorted and unsorted data. True or false?
Verdadero
Falso (*)
8. Which searching algorithm involves using a low, middle, and high index
value to find the location of a value in a sorted set of data (if it exists)?
Sequential Search
Merge Sort
Selection Sort
Binary Search (*)
All of the above
9. A sequential search is an iteration through the array that stops at the index
where the desired element is found. True or false?
Verdadero (*)
Falso
It utilizes the "divide and conquer" method, which makes the algorithm
more error prone.
It requires incrementing through the entire array in the worst case, which
is inefficient on large data sets. (*)
It involves looping through the array multiple times before finding the
value, which is inefficient on large data sets.
It is never inefficient.
11.Big-O Notation is used in Computer Science to describe the performance of
Sorts and Searches on arrays. True or false?
Verdadero (*)
Falso
12.Of the options below, what is the fastest run-time?
n
n^2
lg(n) (*)
n*lg(n)
2.What exception message indicates that a variable may have been mispelled
somewhere in the program?
It does not look for anything. It just keeps reading through your code.
It does not look for anything. It stops interpreting your code.