Oracle Answer (rafi-orilya.blogspot.com).pdf

Share Embed Donate


Short Description

Download Oracle Answer (rafi-orilya.blogspot.com).pdf...

Description

The act method is deleted. The programming statements are not executed. (*) 24. From your Greenfoot lessons, what are the ways that you can view a class's methods?

(Seleccione todas las respuestas correctas) In the scenario In the class's documentation (*) By right-clicking on an instance (*) In the Greenfoot gallery 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?

Marcar para Revisión (1) Puntos

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)

Marcar para Revisión (1) Puntos

name of the class (as String) 28. From your Greenfoot lessons, the reset button resets the scenario back to its initial position. True or false?

Marcar para Revisión (1) Puntos

Verdadero (*) Falso 29. From your Greenfoot lessons, a scenario is a game or simulation implemented in Greenfoot. True or false?

Marcar para Revisión (1) Puntos

Verdadero (*) Falso 30. Use your Greenfoot knowldege: Abstraction occurs in many different ways in programming. True or false?

Marcar para Revisión (1) Puntos

Verdadero (*) Falso 31. In Greenfoot, the  properties of an instance can be modified in the documentation. True or false?

Marcar para Revisión (1) Puntos

Verdadero Falso (*) 32. What type of Greenfoot method would be used to turn an object?

Marcar para Revisión (1) Puntos

orientTo( ); turnAround( ); move ( ); turn( ); (*) 33. In the Greenfoot IDE, which type of variable allows instances to store information? Method variable Instance variable (*)

Marcar para Revisión (1) Puntos

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?

Marcar para Revisión (1) Puntos

Verdadero (*) Falso 35. In Greenfoot, a local variable is declared at the beginning of a class. True or false?

Marcar para Revisión (1) Puntos

Verdadero Falso (*) 36. In Greenfoot, what happens if the end to a while loop isn't established?

Marcar para Revisión (1) Puntos

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?

Marcar para Revisión (1) Puntos

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 (*)

Marcar para Revisión (1) Puntos

Condition 39. In Greenfoot, objects are created from:

Marcar para Revisión (1) Puntos

Methods Classes (*) Signatures Parameters 40. From your Greenfoot lessons, what is incorrect in this code example:

Marcar para Revisión (1) Puntos

setLocation(getX(), (int) (altitude); Spacing Capitalization Parenthesis (*) Comma 41. From your Greenfoot lessons, which of the following is an example of changing test data during a Q/A test cycle?

Marcar para Revisión (1) Puntos

Use a different operating system. Use the mouse instead of the keyboard. Use symbols instead of numbers. (*) All of the above. 42. 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? Verdadero (*) Falso

Marcar para Revisión (1) Puntos

43. In Greenfoot, defined methods must be used immediately. True or false?

Marcar para Revisión (1) Puntos

Verdadero Falso (*) 44. Use your Greenfoot knowledge to answer the question: Where are defined variables typically entered in a class's source code?

Marcar para Revisión (1) Puntos

In the defined method in the source code. Between the constructors and methods in the source code. After the constructors and methods in the source code. At the top of the source code, before the constructors and methods. (*) 45. In Greenfoot, which method is used to add a new instance to a scenario when the world is initialized?

Marcar para Revisión (1) Puntos

addClass addWorld addObject (*) addInstance 46. From your Greenfoot lessons, where should the stop method  be inserted into the source code?

Marcar para Revisión (1) Puntos

In the defined method. In the act method. (*) In the import statement. In the class header. 47. From your Greenfoot lessons, which type of constructor can be used to automate creation of Actor instances? Animal

Marcar para Revisión (1) Puntos

World (*) Actor Vector 48. From your Greenfoot lessons, which axes define an object's  position in a world?

Marcar para Revisión (1) Puntos

(Seleccione todas las respuestas correctas) x (*) z y (*) w 49. In Greenfoot, you can use comparison operators to compare a variable to a random number. True or false?

Marcar para Revisión (1) Puntos

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.

Marcar para Revisión (1) Puntos

Section 4 - Using Eclipse Prueba: Compiling with Eclipse - A First Program: Quiz Revise las respuestas, los resultados y las puntuaciones de las pre guntas que se muestran a continuación. Las respuestas correctas están marcadas con un asterisco (*). Section 1 (Responder todas las preguntas de esta sección) 1. When Eclipse launches, the Welcome page displays. Once this page is closed you cannot return to the resources available on this page. True or False?

Marcar para Revisión (1) Puntos

Verdadero Falso (*) 2. Eclipse provides an edit area to help you navigate a hierarchy of information. True or False?

Marcar para Revisión (1) Puntos

Verdadero Falso (*) 3. Eclipse provides views to help you navigate a hierarchy of information. True or False?

Marcar para Revisión (1) Puntos

Verdadero (*) Falso 4. Tabs are used when more than one file is open in the edit area. True or False?

Marcar para Revisión (1) Puntos

Verdadero (*) Falso 5. A perspective is described as:

A combination of views and editors (*) A combination of views and windows

Marcar para Revisión (1) Puntos

A combination of editor tabs  None of the above 6. The ______________ is the location into which you will store and save your files.

Marcar para Revisión (1) Puntos

Perspective Workspace (*) Editor  None of the above 7. A workspace can have one or more stored projects. True or false?

Marcar para Revisión (1) Puntos

Verdadero (*) Falso 8. Identify the components in the image below.

Marcar para Revisión (1) Puntos

A-Main Method, B-Class, C-Package A-Class, B-MainMethod, C-Package A-Package, B-Main Method, C-Class (*)  None of the above 9. In Eclipse, when you run a Java Application, the results may be displayed in the Console View. True or False?

Marcar para Revisión (1) Puntos

Verdadero (*) Falso 10.A _______________ is used to organize Java related files.

Marcar para Revisión (1) Puntos

Project Workspace Package (*) Collection 11.You need to _______________ Java code to generate a .class file

Marcar para Revisión (1) Puntos

Collect Compile (*) Package Assemble 12.In a project, 2 of the classes must contain a main method. True or False?

Marcar para Revisión (1) Puntos

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?

Marcar para Revisión (1) Puntos

Verdadero (*) Falso 14.Semi-colons at the end of each line are not required to compile successfully. True or False?

Marcar para Revisión (1) Puntos

Verdadero Falso (*) 15.What symbols are required for a compiler to ignore a co mment?

// (*)

Marcar para Revisión (1) Puntos

/* */ /*/ 16.When converting gallons to liters its best to put the calculation result into a variable with a _______________ data type.

Marcar para Revisión (1) Puntos

int double (*)  boolean  None of the above 17.Two variables are required to support a conve rsion of one unit of measure to another unit of measure. True or False?

Marcar para Revisión (1) Puntos

Verdadero (*) Falso

Prueba: Using Object Classes and Driver Classes: Quiz Revise las respuestas, los resultados y las puntuaciones de las pre guntas que se muestran a continuación. Las respuestas correctas están marcadas con un asterisco (*). Section 1 (Responder todas las preguntas de esta sección) 1Which of the two diagrams below illustrate the general form of a Java program? .

Marcar para Revisión (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 Revisión (1) Puntos

Verdadero Falso (*) 3Which of the following defines a driver class?

Marcar para

.

Revisión (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.

4Which of the following defines an object class? .

Marcar para Revisión (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. 5The following defines a package keyword: .

Marcar para Revisión (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 Revisión (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 Revisión (1) Puntos

Provides the compiler information that identifies outside classes used within the current class. Precedes the name of the class. (*)

Prueba: Programming with Data Types and Operators: Quiz Revise las respuestas, los resultados y las puntuaciones de las pre guntas que se muestran a continuación. Las respuestas correctas están marcadas con un asterisco (*). Section 1 (Responder todas las preguntas de esta sección) 1What is the output of the following lines of code? . int j=7,k=5,m=8,result; result=j/m*k; System.out.println(result);

Marcar  para Revisión (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 Revisión (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 Revisión (1) Puntos

4Which line of Java code assigns the value of 5 raised to the power of 8 to a? .

Marcar  para Revisión (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 n umber like 2.541. .

Marcar  para Revisión (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 Revisión (1) Puntos

String int (*) Rectangle Object 7Which of the following is not a legal name for a variable? .

Marcar  para Revisión (1) Puntos

R2d2 dgo2sleep 4geeks (*) to_be_or_not_to_be 8Which of the following examples of Java code is not correct? .

Marcar  para Revisión (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 Revisión (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 Revisión (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 Revisión (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 Revisión (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 Revisión (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;

Prueba: Using Strings: Quiz Revise las respuestas, los resultados y las puntuaciones de las pre guntas que se muestran a continuación. Las respuestas correctas están marcadas con un asterisco (*). Section 1 (Responder todas las preguntas de esta sección) 1Consider the following code snippet. What is printed? .

Marcar  para Revisión

Marcar  para Revisión (1) Puntos

String river = new String("Hudson"); System.out.println(river.length());

(1) Puntos

6 (*) 7 8 Hudson river 2Which of the following creates a String reference named str and . instantiates it?

Marcar  para Revisión (1) Puntos

String str; str="str"; String s="str"; String str=new String("str"); (*) 3Declaring and instantiating a String is much like a ny other type of . variable. However, once instantiated, they are final and cannot be changed. True or false?

Marcar  para Revisión (1) Puntos

Verdadero (*) Falso 4Which of the following statements declares a String object called . name?

Marcar  para Revisión (1) Puntos

String name; (*) String name int name; double name; 5Suppose that s1 and s2 are two strings. Which of the statements or . expressions are valid?

(Seleccione todas las respuestas correctas) String s3 = s1 + s2; (*) String s3 = s1 - s2;

Marcar  para Revisión (1) Puntos

s1 ,,,, 5) ? 5 : 10; numberOfEnemies = ( skillLevel < 5) ? 10 : 5; numberOfEnemies = ( skillLevel >= 5) ? 5 : 10; numberOfEnemies = ( skillLevel >= 5) ? 10 : 5; numberOfEnemies = ( skillLevel > 5) ? 10 : 5; (*) 1How would you use the ternary operator to rewrite this if statement? 2. if (gender == "male") System.out.print("Mr."); else System.out.print("Ms.");

Marcar para Revisión (1) Puntos

System.out.print( (gender == "male") ? "Mr." : "Ms." ); (*) System.out.print( (gender == "male") ? "Ms." : "Mr." ); (gender == "male") ? "Mr." : "Ms." ; (gender == "male") ? "Ms." : "Mr." ;

Prueba: Using Program Control Statements: Quiz Revise las respuestas, los resultados y las puntuaciones de las pre guntas que se muestran a continuación. Las respuestas correctas están marcadas con un asterisco (*). Section 1 (Responder todas las preguntas de esta sección) 1. What is a loop?

Marcar para Revisión (1) Puntos

A keyword used to skip over the remaining code. A set of logic that is repeatedly executed until a certain condition is met. (*) A segment of code that may only ever be executed once per call of the  program.  None of the above. 2. It is necessary to end all loops at some point in your Java program. True or false?

Marcar para Revisión (1) Puntos

Verdadero (*) Falso 3. Which of the following are types of loops in Java?

Marcar para Revisión (1) Puntos

(Seleccione todas las respuestas correctas) while (*) if/else do-while (*) for (*) 4. What is the function of the word "break" in Java?

Marcar para Revisión (1) Puntos

It exits the current loop or case statement. (*) It continues onto the next line of code. It stops the program from running. It does not exist in Java. 5. Identify which situation could be an example of a while loop.

Marcar para Revisión (1) Puntos

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 d ay. 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?

Marcar para Revisión

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

Marcar para Revisión (1) Puntos

Verdadero Falso (*) 8. The syntax below represents a valid initialization of a for loop counter. True or False?

Marcar para Revisión (1) Puntos

 public class ForLoop {  public static void main (String args[]) { for (int i=10; i
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF