Chapter 6 Quiz Review Flashcards

0
Q

JLabels are used to get input and show output: (T/F)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

JFrame is a package: (T/F)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the name of the Java classes that are provided so that the values of primitive data types can be treated as objects?:

A

Wrappers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the following is not a required attribute of a window:

A

Color

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Given the declaration:

Integer sum;

The statement num = 25; is known as auto boxing of the int type. (T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The method getContentPane of the class JFrame is used to access the content pane of the window: (T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

An action event is handled by the class JFrame: (T/F)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which modifier is used to build classes On top of classes that are interfaces?

A

Implements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

If Shape is a class and you create a new class Circle that extends Shape, then shape is a _____ and circle is a _____ .

Which word goes in the first blank?

A

Superclass

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which of the following is not a method of the class JTextField?

A

setVisible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Every window has a title, width, and height

t/F

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The Java class you use to create windows:

A

JFrame

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which of the following GUI components is used to get input into a GUI program ?

A

JTextField

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

GUI stands for Graphical User Interface (T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Write a program that takes as input the radius of a circle and finds the circumference and area of the circle.

Based on this problem statement which of the follow would most likely be chosen as the class?

A

Circle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which of the following statements is not true about GUI programs ?

A

All components are added directly to the GUI window.

16
Q

The class Container is included in the package Javax.swing. (T/F)

17
Q

An interface is a class that contains only the method headings, and each method heading is terminated with a period. (T/F)

18
Q

The first step in solving a problem using object-oriented design is to write down a detailed description of the problem. (T/F)

19
Q

When you click a JButton an event is created, known as an action event. (T/F)

20
Q

The class JFrame contains the method add.

21
Q

Both private and implements are modifiers in Java.

22
Q

Write a program to input 5 test scores of a student and calculate and print the mean, median, and mode of the scores.

Which words from this problem statement could we use to determine the operations for this program?

A

Input, calculate, print.

23
Q

Given the declaration,

Integer num;

The following statements are equivalent:

num = 25;

num = new Integer(25);

(T/F)

24
The object-oriented design, the nouns found in the problem specification can be used to select the operations in the program.
False
25
Which package will you most likely have to import in order to write a GUI program?
Java.awt.*
26
The method addWindowListener is included in the class JFrame. (T/F)
True
27
Whenever there is a superclass-subclass relationship, the superclass inherits all data members and methods of the subclass. (T/F)
False
28
Which class is a part of the package Java.awt?
Container
29
If Shape is a class and you create a new class Circle that extends Shape, then Shape is a(n) ____ and Circle is a(n) ______ Which word goes in the second blank?
Subclass