Saint COM209 all Quizes latest 2016 august

Question # 00369818 Posted By: katetutor Updated on: 08/23/2016 09:23 AM Due on: 08/23/2016
Subject General Questions Topic General General Questions Tutorials:
Question
Dot Image

Saint COM209 Module 2 Quiz 1 latest 2016 august

1. Question :

When an application contains just one version of a method, you can call the method using a(n) __________ of the correct data type.

parameter

scope

output

constructor

Question 2. Question :

A unique identifier is most likely used as a __________ key in a database.

special

public

static

primary

Question 3. Question :

A __________ is a named memory location that you can use to store a value.

cast

variable

reference

primitive

Question 4. Question :

__________ variables are variables that are shared by every instantiation of a class.

Integer

Instance

Class

Time

Question 5. Question :

You can store any character, including nonprinting characters such as a backspace or a tab, in a(n) __________ variable.

int

char

boolean

set

Question 6. Question :

Which of the following is NOT a component of a variable declaration statement?

Data type identifier

Symbolic constant

Variable name

Ending semicolon

Question 7. Question :

A(n) __________ variable can hold only one of two values: true or false.

integer

Boolean

true

comparison

Question 8. Question :

A method can receive __________ arguments, even if it is defined as needing double arguments.

string

integer

constructor

send

Question 9. Question :

If a compiler detects a violation of language rules, it refuses to translate the class to __________.

an application

a logic error

machine code

Java

Question 10. Question :

__________ refers to the hiding of data and methods within an object.

Instance

Inheritance

Passed

Encapsulation

Question 11. Question :

In a __________ environment, you can change directories using the cd command. For example, to change to a directory named MyClasses, you type cd MyClasses and press Enter.

Windows

Java

graphical

DOS

Question 12. Question :

After a successful compile, you can run the class file on any computer that has a __________.

Java language interpreter

web browser

text editor

DOS

Question 13. Question :

A(n) __________ variable is known only within the boundaries of the method.

method

local

double

instance

Question 14. Question :

A locally declared variable always __________ another variable with the same name elsewhere in the class.

creates

masks

deletes

uses

Question 15. Question :

Java contains a class named __________ that allows you to produce dialog boxes.

JBox

JOptionPane

JDialog

JGUI

Question 16. Question :

The percent sign is the __________ operator.

remainder

remaining

percentage

integer division

Question 17. Question :

In Java, when a numeric variable is concatenated to a String using the __________, the entire expression becomes a String.

plus sign

equal sign

concatenate statement

string statement

Question 18. Question :

A data item is __________ when it cannot be changed while a program is running.

variable

constant

primitive

literal

Question 19. Question :

A __________ data type can hold 14 or 15 significant digits of accuracy.

double

float

char

boolean

Question 20. Question :

A __________ is an error not detected until the program asks the computer to do something wrong or even illegal, while executing.

syntax error

runtime error

package

Java API



Saint COM209 Module 4 Quiz 2 latest 2016 august

Question 1. Question :

A(n) __________ is an integer contained within square brackets that indicates one of an array’s variables.

postscript

subscript

variable header

indicator

Question 2. Question :

You use a unary minus sign preceding a value to make the value __________.

negative

positive

valid

constant

Question 3. Question :

In a(n) __________, you continue to compare pairs of items, swapping them if they are out of order, so that the smallest items rise to the top of the list, eventually creating a sorted list.

range match

bubble sort

enhanced for loop

float sort

Question 4. Question :

When an expression containing a __________ is part of an if statement, the assignment is illegal.

single equal sign

greater than sign

double equal sign

Boolean value

Question 5. Question :

Comparing a variable to a list of values in an array is a process called __________ an array.

validating

using

checking

searching

Question 6. Question :

Regarding enumerations, the __________ method returns the name of the calling constant object.

toString

constName

ordinal

nameOf

Question 7. Question :

You can use the __________, which is written as ||, if you want some action to occur when at least one of two conditions is true.

conditional OR operator

logical AND operator

range check

switch statement

Question 8. Question :

The __________ requires three expressions separated with a question mark and a colon.

flowchart

conditional operator

sequence structure

conditional statement

Question 9. Question :

When you execute an if…else statement, only one of the resulting actions takes place depending on the evaluation of the __________ following the if.

Boolean expression

keyword

else statement

independent statement

Question 10. Question :

When you want to increase a variable’s value by exactly 1, use the __________.

power statement

accumulating operator

binary operators

prefix increment operator

Question 11. Question :

You can leave out the __________ statements in a switch structure.

break

switch

if

case

Question 12. Question :

The compiler does not take indentation into account when compiling code, but consistent indentation can help readers understand a program’s __________.

machine language

class

decision

logic

Question 13. Question :

When you place a block within an if statement, it is crucial to place the __________ correctly.

periods

angle brackets

commas

curly braces

Question 14. Question :

The __________ operator is written as the exclamation point ( ! ).

equality

AND

assignment

NOT

Question 15. Question :

The __________ loop checks the value of the loop control variable at the bottom of the loop after one repetition has occurred.

while

do…while

for

else

Question 16. Question :

The simplest statement you can use to make a decision is the __________ statement.

this

Boolean

true false

if

Question 17. Question :

A for loop provides a convenient way to create a(n) __________ loop.

counter-controlled

posttest

while

infinite

Question 18. Question :

When creating a for loop, which statement will correctly initialize more than one variable?

for a=1, b=2

for(a=1; b=2)

for(a=1, b=2)

for(a = 1&& b = 2)

Question 19. Question :

As long as methods do not depend on one another, __________ is a technique that can improve loop performance by combining two loops into one.

loop fusion

prefix incrementing

short-circuit evaluation

do-nothing looping

Question 20. Question :

When you declare a variable of a basic, primitive type, such as int x = 10;, the memory address where x is located holds the __________.

location in memory of 10

memory address of 10

reference to 10

value of 10





Saint COM209 Module 6 Quiz 3 latest 2016 august

Question 1. Question :

In order to use a variable both with a try or catch block and afterward, you must declare the variable before the __________ block begins.

catch

try

main

finally

Question 2. Question :

Because the backslash character starts the escape sequence in Java, you must use two __________ in a string that describes a Path in the DOS operating system.

dashes

quotes

backslashes

periods

Question 3. Question :

The methods in a subclass can use all of the data fields and methods that belong to its parent, with one exception: __________ members of the parent class are not accessible within a child class’s methods.

private

public

final

protected

Question 4. Question :

You can use the __________ modifier with methods when you don’t want the method to be overridden.

override

access

final

end

Question 5. Question :

Placing a file in the __________ directory of your storage device is equivalent to tossing a loose document into a drawer.

root

path

back

loose

Question 6. Question :

If a programming language does not support __________, the language is not considered object-oriented.

syntax

applets

loops

polymorphism

Question 7. Question :

A(n) __________ is not an object, but it points to a memory address.

abstract class

reference

extend

interface

Question 8. Question :

Which of the following is NOT a component of a try block?

A closing curly brace

The keyword try

Executable statements

A throw statement

Question 9. Question :

The Java compiler does not require that you catch or specify __________ exceptions.

checked

runtime

return

optional

Question 10. Question :

__________ compress the data they store, which reduces the size of archived class files.

Dynamic method bindings

JAR files

Type-import-on-demand declarations

Interfaces

Question 11. Question :

Many developers believe that it is poor style for a method to throw more than __________ type(s) of exceptions.

one

two

three or four

eight or ten

Question 12. Question :

In the case where a method might throw more than one exception type, you specify a list of potential exceptions in the method header by separating them with __________.

spaces

semicolons

commas

periods

Question 13. Question :

When a class both extends and implements, by convention the __________ clause is last in the class header.

extends

new

implements

if

Question 14. Question :

The String class __________ method accepts an argument that identifies the field delimiter and returns an array of Strings.

tokens()

divide()

tokenize()

split()

Question 15. Question :

Assertions are meant to be helpful in the __________ stage of a program.

development

testing

production

modeling

Question 16. Question :

A(n) __________ is a holding place for bytes that are waiting to be read or written.

ByteChannel

FileChannel

InputStream

ByteBuffer

Question 17. Question :

Using the keyword __________provides you with an intermediate level of security between public and private access.

protected

this

super

secure

Question 18. Question :

The true benefit of using a(n) __________ file is the ability to retrieve a specific record from a file directly, without reading through other records to locate the desired one.

random access

text

open

input

Question 19. Question :

The BufferedWriter class contains a __________ method that uses the current platform’s line separator.

lineSeparator()

systemSeparator()

newLine()

newSeparator()

Question 20. Question :

When you create a class by making it inherit from another class, you are provided with data fields and __________ automatically.

fonts

methods

class names

arrays




Saint COM209 Module 8 Quiz 4 latest 2016 august

Question 1. Question :

The Swing classes are part of a more general set of UI programming capabilities that are collectively called the __________.

JavaX Classes

Java Foundation Classes

UI packages

Java Extension Libraries

Question 2. Question :

__________ contains many commands that allow you to format text on a web page, import graphic images, and link your page to other web pages.

JApplet

HTML

Swing

Applet

Question 3. Question :

If a window is 200 pixels wide by 100 pixels tall, you can place a Button named pressMe in the approximate center of the window with which of the following statements?

pressMe.setLocation(100,50);

pressMe.setPosition(100,50);

pressMe.setLocation(200,100);

pressMe.setPosition(200,100);

Question 4. Question :

The __________ method of JCheckBox sets the state of the JCheckBox to true for selected or false for unselected.

void setSelected(boolean)

boolean isSelected()

void setText(String)

String getText()

Question 5. Question :

Use the __________ applet method to perform initialization tasks, such as setting variables to initial values or placing applet components on the screen.

initialize()

begin()

init()

start()

Question 6. Question :

The __________ method requires four arguments and draws the outline of a rectangle using the current drawing color.

clearRect()

drawRect()

fillRect()

paintRect()

Question 7. Question :

The JButton, JCheckBox, JComboBox, and JRadioButton components are associated with the __________ method.

addAdjustmentListener()

addChangeListener()

addWindowListener()

addItemListener()

Question 8. Question :

If the JApplet class was not already written, you would have to write more than __________ methods to give your JApplet all the capabilities of the built-in JApplet class.

20

50

200

300

Question 9. Question :

Which of the following statements will correctly add a JMenuBar named myBar to a JFrame?

myBar = setJMenuBar

setJMenuBar(myBar)

JMenuBar.setJMenuBar(myBar)

JMenuBar = new JMenuBar(myBar)

Question 10. Question :

The __________ method provides information about the system in use.

getSystemInfo()

CORRECT getDefaultToolkit()

getDefaultControlPanel()

getToolkit()

Question 11. Question :

If the beginning and ending points used with the fillPolygon() method are __________, the two endpoints are connected by a straight line before the polygon is filled with color.

connected

coordinate pairs

identical

not identical

Question 12. Question :

Which of the following is NOT a method of the KeyListener interface?

keyTyped()

keyPressed()

keyClicked()

keyReleased()

Question 13. Question :

The __________ method allows you to draw a String in a JFrame window.

drawString()

setFont()

drawLine()

setString()

Question 14. Question :

You specify 2D colors by using the __________ method.

paint()

setPaint()

color()

setColor()

Question 15. Question :

You can instantiate an empty Polygon object using which of the following statements?

Polygon someFutureShape = new Polygon(0,0,0,0);

Polygon someFutureShape = new Polygon();

Polygon someFutureShape = new Polygon(0);

Polygon someFutureShape = new Polygon(xPoints, yPoints, xPoints.length);

Question 16. Question :

The repaint() method calls another method named __________, which calls the paint() method.

destroy()

actionPerformed()

update()

super()

Question 17. Question :

Applet code runs in a constrained area called a(n) __________.

sandbox

toolbox

appletview

XHTML

Question 18. Question :

Which of the following lines of code are used when creating a JApplet using only the init() method?

public add.init()

public void init()

public void start()

public new init()

Question 19. Question :

The Color class contains __________ constants.

3

9

13

16

Question 20. Question :

Which of the following statements will correctly set a JFrame named myFrame to be visible?

myFrame.Visible = True

myFrame.setVisible(true)

myFrame.Visibility.True

myFrame.true = Visible

Dot Image
Tutorials for this Question
  1. Tutorial # 00365547 Posted By: katetutor Posted on: 08/23/2016 09:24 AM
    Puchased By: 3
    Tutorial Preview
    The solution of Saint COM209 all Quizes latest 2016 august...
    Attachments
    Saint_COM209_all_Quizes_latest_2016_august.zip (174.97 KB)
    Recent Feedback
    Rated By Feedback Comments Rated On
    cl...ring Rating Helped in securing A+ grade 06/28/2017

Great! We have found the solution of this question!

Whatsapp Lisa