MR 4 ch. 9, 10, 11, 12 & 16 from webstudy

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

In SQL, this is the not-equal-to operator.

<>

The foundation of a GUI application is the

Application class

What SQL operator can be used to perform a search for a substring?

LIKE

What is the default concurrency level of a ResultSet object?

Read-only

Which of the following statements creates an empty TextArea?

TextArea textArea = new TextArea();

A(n) ________ is an object that is generated in memory as the result of an error or an unexpected event.

exception

Which Statement interface method should be used to execute a SELECT statement?

executeQuery

In JavaFX all CSS properties begin with -fx-. true or false?

true

When an object is serialized, it is converted into a series of bytes that contain the object's data. true or false?

true

A(n) ________ is one or more statements that are executed and can potentially throw an exception.

try block

In CSS, selector names that begin with a period are called ________ selectors.

type

When an event takes place, the control responsible for the event creates an event

object

A subclass can directly access

only public and protected members of the superclass.

If a method in a subclass has the same signature as a method in the superclass, the subclass method ________ the superclass method.

overrides

If you do not provide an access specifier for a class member, the class member is given ________ access by default.

package

In Java, a reference variable is ________ because it can reference objects of types different from its own, as long as those types are related to its type through inheritance.

polymorphic

A ________ member's access is somewhere between private and public.

protected

All methods specified by an interface are

public

Which of the following statements correctly specifies two interfaces?

public class ClassA implements Interface1, Interface2

In the hexadecimal color value #CCAA99, the CC refers to which color component?

red

In memory, GUI objects in a ________ are organized as ________ in a tree-like hierarchical data structure.

scene, nodes

What method do you call to register an event handler with a Button control?

setOnAction

The Application class's ________ method is the main entry point for a JavaFX application.

start

When using the throw statement, if you do not pass a message to the exception object's constructor,

the exception will have a null message.

When an exception is thrown by code in the try block, the JVM begins searching the try statement for a catch clause that can handle it and passes control of the program to

the first catch clause that can handle the exception.

In a class hierarchy,

the more general classes are toward the top of the tree and the more specialized classes are toward the bottom.

A TextArea is a multiline TextField that can accept or display several lines of text. true or false?

true

A class must implement the Serializable interface in order for objects of the class to be serialized. true or false?

true

An abstract class is not instantiated itself, but serves as a superclass for other classes. true or false?

true

An event object is created when an event takes place. true or false?

true

Because every class directly or indirectly inherits from the Object class, every class inherits the Object class's members. true or false?

true

Because the subclass is more specialized than the superclass, it is sometimes necessary for the subclass to replace inadequate superclass methods with more suitable ones. true or false?

true

CSS uses the RGB color system to define colors and colors can be specified using six hexadecimal numbers preceded by the # symbol. true or false?

true

If a class has fields that are objects of other classes, those classes must implement the Serializable interface in order to be serialized. true or false?

true

If a method in a subclass has the same signature as a method in the superclass, the subclass method overrides the superclass method. true or false?

true

In SQL, the REFERENCES qualifier ensures referential integrity between tables. true or false?

true

In a JavaFX application, a CSS type selector corresponds to a specific JavaFX node. true or false?

true

Padding is space that appears around the inside edges of a container. true or false?

true

The columns in a table are assigned SQL data types. true or false?

true

When a class contains an abstract method, you cannot create an instance of the class. true or false?

true

When a subclass overrides a superclass method, only the subclass's version of the method can be called with a subclass object. true or false?

true

When catching multiple exceptions that are related to one another through inheritance, you should handle the more specialized exception classes before the more general exception classes. true or false?

true

When you deserialize an object using the readObject method, you must cast the return value to the desired class type. true or false?

true

The ________ class is used to create a menu bar.

MenuBar

Which of the following is not a way a user can interact with a computer?

All of these are ways a user can interact with a computer.

What will happen if you try to store duplicate data in a primary key column?

An error will occur.

If you wish to sort the results of an SQL query, you can use the ________ clause.

ORDER BY

When a class does not use the extends key word to inherit from another class, Java automatically extends it from the ________ class.

Object

The type of control normally used when you want the user to only be allowed to select one option from several possible options is the

RadioButton

Which of the following statements creates a Slider with a range of 1 to 20 with a starting value of 1?

Slider slider = new Slider(1.0, 20.0, 1.0);

Which SQL statement is used to delete a table from a database?

DROP TABLE

Look at the following code: FileInputStream fstream = new FileInputStream("info.dat"); DataInputStream inputFile = new DataInputStream(fstream); This code could also be written as

DataInputStream inputFile = new DataInputStream(new FileInputStream("info.dat"));

What string lists the protocol that should be used to access a database, the name of the database, and potentially other items?

Database URL

Unchecked exceptions are those that inherit from the

Error class or the RuntimeException class.

In an inheritance relationship, the subclass constructor always executes before the superclass constructor. true or false?

False

To write data to a binary file, you create objects from the following classes:

FileOutputStream and DataOutputStream.

A column in one table that references a primary key in another table is known as what?

Foreign Key

On a Web page, the ________ specifies what information to display and the ________ specifies how that information should be displayed.

HTML, CSS

You use this statement in SQL to insert a new row into a table.

INSERT

Of the following column names, which one is most likely a primary key column?

ItemNumber

The ________ control uses a drop-down list as its display.

ListView

A(n) ________ is a method that appears in a superclass, but expects to be overridden in a subclass.

abstract method

A result set is an object that is somewhat similar to a collection and

contains the results of an SQL statement.

In a UML diagram, you show a realization relationship by connecting a class and an interface with a

dashed line that has an open arrowhead at one end.

An action that takes place while a program is running is a(n)

event.

This key word indicates that a class inherits from another class.

extends

A ComboBox differs only from a ListView in that a ComboBox must have a minimum of three items. true or false?

false

In a JavaFX application, you are limited to a single layout container since layout containers cannot be nested. true or false?

false

In a JavaFX application, you must recompile the application each time you make a change to the stylesheet. true or false?

false

Radio buttons are normally used when you want the user to be able to select one or more options from a group of several possible options. true or false?

false

System designers commonly use UML diagrams to show the relationships between database tables. true or false?

false

The "preferred size" of a scene is usually the whole size of the user's monitor. true or false?

false

The BorderPane container always displays its content in five regions which are top, bottom, left, right, and center and each region must be used. true or false?

false

The command line interface is an event-driven interface. true or false?

false

To display an image in a JavaFX application, you use either the Image or ImageView class. true or false?

false

You show inheritance in a UML diagram by connecting two classes with a line that has an open arrowhead that points to the subclass. true or false?

false

If a random access file contains a stream of characters, which of the following statements would move the file pointer to the starting byte of the fifth character in the file?

file.seek(8);

When a method is declared with the ________ modifier, it cannot be overridden in a subclass.

final

Classes that inherit from the Error class are

for exceptions that are thrown when a critical error occurs, and the application program should not try to handle them.

To replace a ListView control's existing items with a new list of items, use the ________ method.

getItems().setAll()

To retrieve text that a user has typed into a TextField control, you call the ________ method.

getText

Which of the following import statements is required in order to write an event handler class?

import javafx.event.EventHandler;

Which of the following import statements is required in order to create a BorderPane layout container?

import javafx.scene.layout.BorderPane;

To display an image in a JavaFX application you must

include both the Image and the ImageView classes.

In object-oriented programming, ________ allows you to extend the capabilities of a class by creating another class that is a specialized version of it.

inheritance

You can use this operator to determine whether an object is an instance of a particular class.

instanceof

When a class implements an interface, an inheritance relationship known as ________ is established.

interface inheritance

When an exception is thrown,

it must be handled by the program or by the default exception handler.

When writing a string to a binary file or reading a string from a binary file, it is recommended that you use

methods that use UTF-8 encoding.

In order to preserve an image's aspect ratio (so it does not appear stretched or distorted), you should use which of the following? Assume myView references an ImageView object.

myView.setPreserveRatio(true);

To apply specific styles to all of the nodes in a scene, use the ________ selector.

.root

When one object is a specialized version of another object, there is this type of relationship between them.

"is a"

Protected class members can be denoted in a UML diagram with the ________ symbol.

#

Which of the following shows how a single quote is represented as part of a string in SQL?

' '

In an entity relationship diagram, the primary keys are denoted with

(PK).

Which of the following creates a custom style class that will allow a Button control to appear with a blue background and yellow text?

.button-color { -fx- background-color: blue; -fx- text-fill: yellow;

This SQL statement can be used to create a database table.

CREATE TABLE

In the following statement, which is the subclass? public class ClassA extends ClassB implements ClassC

ClassA

In the following statement, which is the interface? public class ClassA extends ClassB implements ClassC

ClassC

If you have two RadioButtons (dogRadio and catRadio), how should you code them to create a mutually exclusive relationship?

ToggleGroup radioGroup = new ToggleGroup(); dogRadio.setToggleGroup(radioGroup); catRadio.setToggleGroup(radioGroup):

In ________, inheritance is shown with a line that has an open arrowhead at one end that points to the superclass.

UML diagrams

The catch clause

all of the above

What happens when the following code is executed? ComboBox<string>myComboBox = new ComboBox<>(); myComboBox.getItems().addAll(5, 10, 15, 20);

A compiler error will occur.

A protected member of a class may be directly accessed by

All of the above

What will be the result of the following statements? FileInputStream fstream = new FileInputStream("Input.dat"); DataInputStream inFile = new DataInputStream(fstream);

The inFile variable will reference an object that is able to read binary data from the Input.dat file.

Assuming three ImageView objects named puppy, kitten, and bunny have been created, what does the following statement do? HBox hbox = new HBox(5, puppy, kitten, bunny);

There will be five pixels of space between the controls horizontally in the container.

To serialize an object and write it to the file, use this method of the ObjectOutputStream class.

WriteObject

In SQL, this character can be used as a wildcard to represent a single character.

_ (underscore)

What do most developers prefer to use when developing applications that work with an intensive amount of data?

a database management system

If a method does not handle a possible checked exception, what must the method have?

a throws clause in its header


Kaugnay na mga set ng pag-aaral

Ch 6: THE SKELETAL SYSTEM: Bone Tissue

View Set

La Première guerre mondiale 2022 CM2C

View Set

"Foreign Policy and War in a Progressive Era" Chapter 20 Packet Answers

View Set

A + P Ch. 4 (Cellular Metabolism)

View Set

Social Media Marketing Chapter 4 Quiz

View Set