Deck 8: Improving the User Interface

Full screen (f)
exit full mode
Question
The printf method could be used to specify the ____ in a floating-point number.

A) placement of the decimal
B) number of digits to the right of the decimal point
C) exponents
D) value
Use Space or
up arrow
down arrow
to flip the card.
Question
In a table, trailing or forward spaces are used to occupy columns that are not filled by a value. ____________________
Question
The ____ method is used to apply formatting.

A) formatchar
B) println
C) enhancetext
D) printf
Question
The parameters of the method printf consist of a ____ and one or more data values.

A) fixed-point number
B) floating-point number
C) format string
D) controller pattern
Question
The Thermometer class stores the temperature internally in Fahrenheit.
Question
The print and println methods do not generally display all of the digits in floating-point numbers.
Question
The String method format expects the same parameters as the printf method, and returns a formatted string.
Question
The l character is used for a platform-independent end of line. ____________________
Question
Real GUI programs are event-driven. ____________________
Question
The key feature of a formatted table is that each column has a designated width, and all the values in a column are justified in the same manner. ____________________
Question
The controller would be responsible for instantiating and attaching an object to a command button.
Question
A controller pattern is a combination of literal string information and formatting information.
Question
The best way for a program to respond when an invalid number format is entered is to halt the program.
Question
Java supports the type double for numbers with many digits of precision.
Question
The String variable ____ controls how many times a loop repeats.

A) whenEnd
B) doItAgain
C) stopWhen
D) ifEnd
Question
A GUIWindow is just a JFrame with some extra behavior.
Question
The key feature of a formatted table is that each column has a designated width, and all the values in a column are justified in the same manner.
Question
The method printf includes several format flags that support justification as well as other styles.
Question
Which of the following is NOT an example of a technique for handling repeating sets of inputs?

A) Boolean
B) count
C) query
D) sentinel
Question
A data model class is responsible for initializing and managing the data used by the program. ____________________
Question
The ____ code is used to display an octal integer.

A) d
B) f
C) o
D) x
Question
Alignment of text in a table column is called ____.

A) leading space
B) application
C) specification
D) justification
Question
A(n) ____ statement is used to detect and respond to an exception so it does not halt the program.

A) if-else
B) try-catch
C) void
D) listener
Question
The ____ is a set of classes that sets up the other elements in a main method, so as to provide an entry point for running a Java program.

A) model
B) application
C) view
D) controller
Question
The ____ flag is used for left justification.

A) ,
B) l
C) <
D) -
Question
A(n) ____________________-driven program begins by displaying a list of options from which the user selects one.
Question
A(n) ____________________-controlled input technique asks the user if there are more inputs before continuing.
Question
A formatting specifier code begins with a ____ character.

A) %
B) *
C) /
D) &
Question
FIGURE 8-2 <strong>FIGURE 8-2   Figure 8-2 above shows the interface for a ____-controlled program.</strong> A) count B) menu C) query D) sentinel <div style=padding-top: 35px>
Figure 8-2 above shows the interface for a ____-controlled program.

A) count
B) menu
C) query
D) sentinel
Question
When a(n) ____ program opens, it sits there and waits for events such as the user clicking the mouse.

A) Java
B) GUI
C) menu-driven
D) application
Question
The ____ character is used to display a fixed floating-point integer.

A) d
B) f
C) o
D) x
Question
The ____ character is used in the display of a string.

A) e
B) g
C) n
D) s
Question
The ____ is a set of classes that are listeners.

A) model
B) application
C) view
D) controller
Question
The ____ character is used in the display of 167.e+2.

A) e
B) g
C) n
D) s
Question
The ____ character is used to display a decimal integer.

A) d
B) f
C) o
D) x
Question
The ____________________ format flag is used to show decimal separators.
Question
Identify the letter of the choice that best matches the phrase or definition.
a.^
b.0
c.x
d.model
e.controller
Used to convert letters to uppercase.
Question
A(n) ____________________ consists of a fixed number of columns within which the characters of a data value can be placed.
Question
FIGURE 8-1 <strong>FIGURE 8-1   Figure 8-1 above shows the interface for a ____-controlled program.</strong> A) count B) menu C) query D) sentinel <div style=padding-top: 35px>
Figure 8-1 above shows the interface for a ____-controlled program.

A) count
B) menu
C) query
D) sentinel
Question
The ____ is responsible for displaying the data model and providing the user with visual controls for interaction.

A) model
B) application
C) view
D) controller
Question
Identify the letter of the choice that best matches the phrase or definition.
a.^
b.0
c.x
d.model
e.controller
An example is the Thermometer class.
Question
Identify the letter of the choice that best matches the phrase or definition.
a.^
b.0
c.x
d.model
e.controller
Used to format a hexadecimal integer.
Question
Identify the letter of the choice that best matches the phrase or definition.
a.^
b.0
c.x
d.model
e.controller
Responsible for handling user interaction with the program.
Question
Identify the letter of the choice that best matches the phrase or definition.
a.^
b.0
c.x
d.model
e.controller
Used to show leading zeroes.
Question
How does a try-catch statement work? Why are they important? Describe a situation in which one might be helpful.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/45
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 8: Improving the User Interface
1
The printf method could be used to specify the ____ in a floating-point number.

A) placement of the decimal
B) number of digits to the right of the decimal point
C) exponents
D) value
B
2
In a table, trailing or forward spaces are used to occupy columns that are not filled by a value. ____________________
False
3
The ____ method is used to apply formatting.

A) formatchar
B) println
C) enhancetext
D) printf
D
4
The parameters of the method printf consist of a ____ and one or more data values.

A) fixed-point number
B) floating-point number
C) format string
D) controller pattern
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
5
The Thermometer class stores the temperature internally in Fahrenheit.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
6
The print and println methods do not generally display all of the digits in floating-point numbers.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
7
The String method format expects the same parameters as the printf method, and returns a formatted string.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
8
The l character is used for a platform-independent end of line. ____________________
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
9
Real GUI programs are event-driven. ____________________
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
10
The key feature of a formatted table is that each column has a designated width, and all the values in a column are justified in the same manner. ____________________
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
11
The controller would be responsible for instantiating and attaching an object to a command button.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
12
A controller pattern is a combination of literal string information and formatting information.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
13
The best way for a program to respond when an invalid number format is entered is to halt the program.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
14
Java supports the type double for numbers with many digits of precision.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
15
The String variable ____ controls how many times a loop repeats.

A) whenEnd
B) doItAgain
C) stopWhen
D) ifEnd
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
16
A GUIWindow is just a JFrame with some extra behavior.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
17
The key feature of a formatted table is that each column has a designated width, and all the values in a column are justified in the same manner.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
18
The method printf includes several format flags that support justification as well as other styles.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
19
Which of the following is NOT an example of a technique for handling repeating sets of inputs?

A) Boolean
B) count
C) query
D) sentinel
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
20
A data model class is responsible for initializing and managing the data used by the program. ____________________
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
21
The ____ code is used to display an octal integer.

A) d
B) f
C) o
D) x
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
22
Alignment of text in a table column is called ____.

A) leading space
B) application
C) specification
D) justification
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
23
A(n) ____ statement is used to detect and respond to an exception so it does not halt the program.

A) if-else
B) try-catch
C) void
D) listener
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
24
The ____ is a set of classes that sets up the other elements in a main method, so as to provide an entry point for running a Java program.

A) model
B) application
C) view
D) controller
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
25
The ____ flag is used for left justification.

A) ,
B) l
C) <
D) -
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
26
A(n) ____________________-driven program begins by displaying a list of options from which the user selects one.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
27
A(n) ____________________-controlled input technique asks the user if there are more inputs before continuing.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
28
A formatting specifier code begins with a ____ character.

A) %
B) *
C) /
D) &
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
29
FIGURE 8-2 <strong>FIGURE 8-2   Figure 8-2 above shows the interface for a ____-controlled program.</strong> A) count B) menu C) query D) sentinel
Figure 8-2 above shows the interface for a ____-controlled program.

A) count
B) menu
C) query
D) sentinel
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
30
When a(n) ____ program opens, it sits there and waits for events such as the user clicking the mouse.

A) Java
B) GUI
C) menu-driven
D) application
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
31
The ____ character is used to display a fixed floating-point integer.

A) d
B) f
C) o
D) x
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
32
The ____ character is used in the display of a string.

A) e
B) g
C) n
D) s
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
33
The ____ is a set of classes that are listeners.

A) model
B) application
C) view
D) controller
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
34
The ____ character is used in the display of 167.e+2.

A) e
B) g
C) n
D) s
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
35
The ____ character is used to display a decimal integer.

A) d
B) f
C) o
D) x
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
36
The ____________________ format flag is used to show decimal separators.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
37
Identify the letter of the choice that best matches the phrase or definition.
a.^
b.0
c.x
d.model
e.controller
Used to convert letters to uppercase.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
38
A(n) ____________________ consists of a fixed number of columns within which the characters of a data value can be placed.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
39
FIGURE 8-1 <strong>FIGURE 8-1   Figure 8-1 above shows the interface for a ____-controlled program.</strong> A) count B) menu C) query D) sentinel
Figure 8-1 above shows the interface for a ____-controlled program.

A) count
B) menu
C) query
D) sentinel
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
40
The ____ is responsible for displaying the data model and providing the user with visual controls for interaction.

A) model
B) application
C) view
D) controller
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
41
Identify the letter of the choice that best matches the phrase or definition.
a.^
b.0
c.x
d.model
e.controller
An example is the Thermometer class.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
42
Identify the letter of the choice that best matches the phrase or definition.
a.^
b.0
c.x
d.model
e.controller
Used to format a hexadecimal integer.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
43
Identify the letter of the choice that best matches the phrase or definition.
a.^
b.0
c.x
d.model
e.controller
Responsible for handling user interaction with the program.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
44
Identify the letter of the choice that best matches the phrase or definition.
a.^
b.0
c.x
d.model
e.controller
Used to show leading zeroes.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
45
How does a try-catch statement work? Why are they important? Describe a situation in which one might be helpful.
Unlock Deck
Unlock for access to all 45 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 45 flashcards in this deck.