Deck 6: More on the Selection Structure
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Match between columns
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/42
Play
Full screen (f)
Deck 6: More on the Selection Structure
1
A primary decision is always made by an outer selection structure, while a secondary decision is always made by a nested selection structure.
True
2
A nested selection structure can appear within or immediately before the True path or the False path of the outer selection structure.
False
3
An application may need to communicate with the user during run time.
True
4
In situations where the selection structure has many paths from which to choose, it is often simpler and clearer to code the selection structure using the ____ statement.
A) Select Case
B) Begin/End
C) If/Then
D) Do/Loop
A) Select Case
B) Begin/End
C) If/Then
D) Do/Loop
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
5
A ____ decision is always made by a nested selection structure.
A) static
B) dynamic
C) primary
D) secondary
A) static
B) dynamic
C) primary
D) secondary
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
6
The Select Case statement ends with the ____ clause.
A) End Select
B) End
C) Finish
D) Stop Select
A) End Select
B) End
C) Finish
D) Stop Select
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
7
If the Select Case statement includes a Case Else clause, the Case Else clause must be the ____ clause in the statement.
A) last
B) only
C) primary
D) secondary
A) last
B) only
C) primary
D) secondary
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
8
The ____ in a flowchart represents the multiple-alternative selection structure's condition.
A) circle
B) diamond
C) square
D) triangle
A) circle
B) diamond
C) square
D) triangle
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
9
When either a selection structure's True path or its False path contains another selection structure, the inner selection structure is referred to as a ____.
A) truth table
B) nested selection structure
C) decision tree
D) decision plan
A) truth table
B) nested selection structure
C) decision tree
D) decision plan
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
10
You use the ____ keyword when you know both the upper and lower values in a range.
A) Is
B) All
C) To
D) From
A) Is
B) All
C) To
D) From
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
11
When using the Select Case statement, the data type of the ____ must be compatible with the data type of the selectorExpression .
A) Case expression
B) Case Else clause
C) instructions
D) expressions
A) Case expression
B) Case Else clause
C) instructions
D) expressions
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
12
Both paths in a selection structure can include instructions that declare variables, perform calculations, and so on.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
13
The expression 1 To 5 in the Case 1 To 5 clause specifies the range of numbers from ____.
A) 2 to 5, inclusive
B) 2 to 4, inclusive
C) 1 to 4, inclusive
D) 1 to 5, inclusive
A) 2 to 5, inclusive
B) 2 to 4, inclusive
C) 1 to 4, inclusive
D) 1 to 5, inclusive
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
14
Each Case clause represents a different ____.
A) method
B) program
C) path
D) partition
A) method
B) program
C) path
D) partition
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
15
When a multiple-alternative selection structure has many paths from which to choose, it is often simpler and clearer to use the If/ElseIf/Else form of the selection structure rather than the Select Case statement.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
16
Each of the individual Case clauses, except the Case Else clause, must contain a(n) ____, which can include one or more expressions.
A) valueList
B) resultList
C) selectList
D) expressionList
A) valueList
B) resultList
C) selectList
D) expressionList
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
17
A _____ decision is always made by an outer selection structure.
A) dynamic
B) static
C) primary
D) secondary
A) dynamic
B) static
C) primary
D) secondary
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
18
You use the ____ keyword when you know only one end of a range (either the upper or lower end).
A) Is
B) All
C) To
D) From
A) Is
B) All
C) To
D) From
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
19
You add a radio button to a form using the ____ tool in the toolbox.
A) RadioButton
B) Radio
C) Button
D) RadioTool
A) RadioButton
B) Radio
C) Button
D) RadioTool
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
20
A(n) ____ selection structure can choose from several alternatives.
A) open-ended
B) concurrent
C) dynamic
D) multiple-alternative
A) open-ended
B) concurrent
C) dynamic
D) multiple-alternative
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
21
Multiple-alternative selection structures are also called ____________________ structures.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
22
How does the diamond in the multiple-alternative selection structure differ from the diamonds in the single-alternative and dual-alternative selection structures?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
23
Describe an example of when you would want to use a radio button.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
24
When displaying a message in the message box using the MessageBox.Show method, what three items appear in the message box?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
25
How do you prevent the entry of inappropriate characters in a text box?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
26
You display the message box that contains text, one or more buttons, and an icon using the ____ method.
A) MessageBox.Show
B) CommunicationBox.Show
C) Message.Show
D) Show.box
A) MessageBox.Show
B) CommunicationBox.Show
C) Message.Show
D) Show.box
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
27
To prevent a text box from accepting an inappropriate character, you first use the ____ parameter's KeyChar property to determine the pressed key.
A) t
B) a
C) e
D) p
A) t
B) a
C) e
D) p
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
28
What is the difference between a primary decision and a secondary decision?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
29
The ____ radio button is either the radio button that represents the user's most likely choice or the first radio button in a group of buttons.
A) initial
B) primary
C) default
D) open
A) initial
B) primary
C) default
D) open
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
30
A control's ____________________ event occurs each time the user presses a key while the control has the focus.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
31
When do you typically use multiple-alternative selection structures?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
32
To include two groups of radio buttons in an interface, at least one of the groups must be placed within a ____, such as a group box, panel, or table layout panel.
A) Case
B) structure
C) container
D) statement
A) Case
B) structure
C) container
D) statement
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
33
Between the Select Case and End Select clauses are the individual ____________________ clauses.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
34
____________________ buttons allow you to limit the user to only one choice from a group of two or more related but mutually exclusive choices.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
35
The recommended maximum number of radio buttons in a group is ____.
A) four
B) five
C) seven
D) unlimited
A) four
B) five
C) seven
D) unlimited
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
36
How do you include more than one expression in an expressionList ?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
37
A control's KeyPress event occurs each time the user presses a key while the control ____.
A) has the focus
B) contains a value
C) is highlighted
D) has a parameter
A) has the focus
B) contains a value
C) is highlighted
D) has a parameter
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
38
Describe three characteristics of the radio button interface.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
39
What are the two keywords that you can use to specify a range of values in a Case clause's expressionList ? When is each keyword used?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
40
When either a selection structure's true path or its false path contains another selection structure, the inner selection structure is referred to as a(n) ____________________ structure.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
41
Match between columns
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
42
In code, how do you refer to the Backspace key on your keyboard?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck