Deck 5: More on the Selection Structure

Full screen (f)
exit full mode
Question
Reversing the primary and secondary logical decisions in a program's code has no impact on the program's execution.
Use Space or
up arrow
down arrow
to flip the card.
Question
The primary decision is always made by the outer selection structure.
Question
The TypeOf ... Is operator is used to compare two strings of data in a selection structure.
Question
The Is operator is used to evaluate and determine if two object references refer to the same object.
Question
The case expression Case Is <= 15 will check and execute for all values less or equal to 15.
Question
In a case selection structure the expression Case Is 10 To 5 is an incorrectly formed case statement.
Question
When several alternatives exist for processing data, it is usually simpler and clearer to use a Select Case structure rather than a If/ElseIf/Else structure.
Question
A nested selection structure is used when more than one decision needs to be made prior to executing instructions.
Question
When the computer finds a match in the expressionlist in a Select Case logic structure, all of the instructions are executed up to the next Case clause, a Case Else, or an End Select.
Question
Every Select Case logic structure must be terminated with End Case.
Question
A set of step-by-step instructions to accomplish a task is referred to as an algorithm.
Question
In a Case expression, when only one limiting value is known the programmer should use Is keyword instead of the To keyword when creating the expression.
Question
A nested selection structure can only be coded using the true path of a selection structure.
Question
An unnecessary selection structure within a nested selection structure will make the program inefficient.
Question
Desk-checking is the process of using sample data to walk through each of the steps in the algorithm manually to verify that it is a correct solution to a problem.
Question
When a user selects a second checkbox in a group, previously selected checkbox items are deselected.
Question
When you use a range test in a Case clause, the value on the left side of the To must always be lower than the value on the right side.
Question
A nested selection structure using If/ElseIf/Else logic structures needs only one End If terminus to mark the end of the selection structure.
Question
An inner selection structure contained within an outer selection structure is referred to as a complex selection structure.
Question
A common mistake when writing selection structures is to use a logical operator in place of a nested selection structure.
Question
When the programmer wants to limit the user to one choice during input of mutually exclusive options the ____ control should be used.

A) TextBox
B) CheckBox
C) RadioButton
D) Label
Question
When a nested selection structure is encountered, the ____ decision is always made by the outer selection structure.

A) primary
B) secondary
C) binary
D) linear
Question
If only one bound is known for a range when constructing a Case expression, it is best to use the ____ keyword in identifying the range.

A) From
B) Is
C) To
D) Range
Question
The Visual Basic .NET Get statement causes the execution of a user-defined Sub procedure.
Question
The case executed when none of the preceding cases are true is the Case ____.

A) Otherwise
B) Else
C) Next
D) Last
Question
When a nested selection structure is encountered, the ____ decision is always made by the inner selection structure.

A) primary
B) secondary
C) binary
D) linear
Question
The Select Case selection structure must be terminated using ____.

A) End
B) End Case
C) End Select
D) Select End
Question
The pattern-matching character ? is used with the Like operator to match a single character.
Question
The selection structure operator ____ determines if two object references refer to the same object.

A) Is
B) TypeOf...Is
C) Like
D) To
Question
The pattern-matching character ____ is used with the Like operator to match a single digit.

A) *
B) #
C) ?
D) &
Question
The maximum number of radio buttons that can be selected from a group is ____.

A) 1
B) 3
C) 5
D) 7
Question
The minimum number of radio buttons in a group is one.
Question
If both the upper and lower bounds are known for a range when constructing a Case expression, it is best to use the ____ keyword in identifying the range.

A) From
B) Is
C) To
D) Range
Question
The maximum number of selected items on a radio box group with five choices is four items selected.
Question
The recommended maximum number of radio buttons placed in a group is ____.

A) 1
B) 3
C) 5
D) 7
Question
The pattern-matching character ____ is used with the Like operator to match zero or more characters.

A) *
B) #
C) ?
D) &
Question
The selection structure operator ____ determines whether an object is a specified type.

A) Is
B) TypeOf ...Is
C) Like
D) To
Question
A meat packer grades meat "P" for Prime, "C" for Choice, "S" for Standard, and "G" for Good. Which of the following Case expressions is incorrect?

A) Case "P", "C"
B) Case "S"
C) Case "CGSP"
D) Case Else
Question
The default radio button is designated by setting the Checked property to a value of True.
Question
When a selection structure's true path or false path contains another selection structure, the inner selection structure is referred to as a ____ selection structure.

A) complex
B) primary
C) nested
D) combined
Question
After creating a Random object, you can generate random integers using the ____ method.

A) Random.Call
B) Random.Number
C) Random.Generate
D) Random.Next
Question
An online book seller uses the following schedule to determine the shipping costs: Category Books Ordered Basic cost Plus per book I 1-3 $5 .25 II 4-7 $7 .20 III 8-11 $9 .15 IV 12 or more $11 .10 What is a correct case expression for a category II book order based upon Books Ordered?

A) Case Is < 7
B) Case 4 To 7
C) Case Is 4 To 7
D) Case Between 4 and 7
Question
The ____ operator is used to determine if an object is a specified type.

A) ClassOf
B) TypeOf...Is
C) ObjectOf
D) Is..A
Question
The minimum number of options for a check box group is ____.

A) 1
B) 2
C) 4
D) 7
Question
Which of the following would be an appropriate use of a check box control?

A) Marital Status (Married, Single)
B) Gender (Female, Male)
C) Full Time - Part Time
D) Insurance Benefits (Health, Dental, Vision)
Question
When the programmer does not want to limit the user to one choice during input of independent and nonexclusive options the ____ control should be used.

A) TextBox
B) CheckBox
C) RadioButton
D) Label
Question
Instructions entered in a form's ____ event procedure are processed when the application is started and the form is loaded into memory.

A) Load
B) Start
C) Begin
D) Call
Question
Which of these can be used to determine if a student had earned a passing grade of an "A", "B", or "C", assuming that the grade is in the string variable grade?

A) grade Like "["A" or "B" or "C"]"
B) grade Like "['A' or 'B' or 'C']"
C) grade Like "[ABC]"
D) grade Like "A or B or C"
Question
Which of these can be used to determine if a student had earned a grade of an "D" or "F", assuming that a grade of "A", "B", "C", "D" or "F" is in the string variable grade?

A) grade Like "["D" or "F"]"
B) grade Like "['F' or 'D']"
C) grade Like "[!ABC]"
D) grade Like "!A or !B or !C"
Question
In a Case selection structure, each expression in an expression list is separated by a ____.

A) semicolon (;)
B) colon (:)
C) period (.)
D) comma (,)
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 5: More on the Selection Structure
1
Reversing the primary and secondary logical decisions in a program's code has no impact on the program's execution.
False
2
The primary decision is always made by the outer selection structure.
True
3
The TypeOf ... Is operator is used to compare two strings of data in a selection structure.
False
4
The Is operator is used to evaluate and determine if two object references refer to the same object.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
The case expression Case Is <= 15 will check and execute for all values less or equal to 15.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
In a case selection structure the expression Case Is 10 To 5 is an incorrectly formed case statement.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
When several alternatives exist for processing data, it is usually simpler and clearer to use a Select Case structure rather than a If/ElseIf/Else structure.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
A nested selection structure is used when more than one decision needs to be made prior to executing instructions.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
When the computer finds a match in the expressionlist in a Select Case logic structure, all of the instructions are executed up to the next Case clause, a Case Else, or an End Select.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
Every Select Case logic structure must be terminated with End Case.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
A set of step-by-step instructions to accomplish a task is referred to as an algorithm.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
In a Case expression, when only one limiting value is known the programmer should use Is keyword instead of the To keyword when creating the expression.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
A nested selection structure can only be coded using the true path of a selection structure.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
An unnecessary selection structure within a nested selection structure will make the program inefficient.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
Desk-checking is the process of using sample data to walk through each of the steps in the algorithm manually to verify that it is a correct solution to a problem.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
When a user selects a second checkbox in a group, previously selected checkbox items are deselected.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
When you use a range test in a Case clause, the value on the left side of the To must always be lower than the value on the right side.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
A nested selection structure using If/ElseIf/Else logic structures needs only one End If terminus to mark the end of the selection structure.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
An inner selection structure contained within an outer selection structure is referred to as a complex selection structure.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
A common mistake when writing selection structures is to use a logical operator in place of a nested selection structure.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
When the programmer wants to limit the user to one choice during input of mutually exclusive options the ____ control should be used.

A) TextBox
B) CheckBox
C) RadioButton
D) Label
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
When a nested selection structure is encountered, the ____ decision is always made by the outer selection structure.

A) primary
B) secondary
C) binary
D) linear
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
If only one bound is known for a range when constructing a Case expression, it is best to use the ____ keyword in identifying the range.

A) From
B) Is
C) To
D) Range
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
The Visual Basic .NET Get statement causes the execution of a user-defined Sub procedure.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
The case executed when none of the preceding cases are true is the Case ____.

A) Otherwise
B) Else
C) Next
D) Last
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
When a nested selection structure is encountered, the ____ decision is always made by the inner selection structure.

A) primary
B) secondary
C) binary
D) linear
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
The Select Case selection structure must be terminated using ____.

A) End
B) End Case
C) End Select
D) Select End
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
The pattern-matching character ? is used with the Like operator to match a single character.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
The selection structure operator ____ determines if two object references refer to the same object.

A) Is
B) TypeOf...Is
C) Like
D) To
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
The pattern-matching character ____ is used with the Like operator to match a single digit.

A) *
B) #
C) ?
D) &
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
The maximum number of radio buttons that can be selected from a group is ____.

A) 1
B) 3
C) 5
D) 7
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
The minimum number of radio buttons in a group is one.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
If both the upper and lower bounds are known for a range when constructing a Case expression, it is best to use the ____ keyword in identifying the range.

A) From
B) Is
C) To
D) Range
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
The maximum number of selected items on a radio box group with five choices is four items selected.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
The recommended maximum number of radio buttons placed in a group is ____.

A) 1
B) 3
C) 5
D) 7
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
The pattern-matching character ____ is used with the Like operator to match zero or more characters.

A) *
B) #
C) ?
D) &
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
The selection structure operator ____ determines whether an object is a specified type.

A) Is
B) TypeOf ...Is
C) Like
D) To
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
A meat packer grades meat "P" for Prime, "C" for Choice, "S" for Standard, and "G" for Good. Which of the following Case expressions is incorrect?

A) Case "P", "C"
B) Case "S"
C) Case "CGSP"
D) Case Else
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
The default radio button is designated by setting the Checked property to a value of True.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
When a selection structure's true path or false path contains another selection structure, the inner selection structure is referred to as a ____ selection structure.

A) complex
B) primary
C) nested
D) combined
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
After creating a Random object, you can generate random integers using the ____ method.

A) Random.Call
B) Random.Number
C) Random.Generate
D) Random.Next
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
An online book seller uses the following schedule to determine the shipping costs: Category Books Ordered Basic cost Plus per book I 1-3 $5 .25 II 4-7 $7 .20 III 8-11 $9 .15 IV 12 or more $11 .10 What is a correct case expression for a category II book order based upon Books Ordered?

A) Case Is < 7
B) Case 4 To 7
C) Case Is 4 To 7
D) Case Between 4 and 7
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
The ____ operator is used to determine if an object is a specified type.

A) ClassOf
B) TypeOf...Is
C) ObjectOf
D) Is..A
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
The minimum number of options for a check box group is ____.

A) 1
B) 2
C) 4
D) 7
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
Which of the following would be an appropriate use of a check box control?

A) Marital Status (Married, Single)
B) Gender (Female, Male)
C) Full Time - Part Time
D) Insurance Benefits (Health, Dental, Vision)
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
When the programmer does not want to limit the user to one choice during input of independent and nonexclusive options the ____ control should be used.

A) TextBox
B) CheckBox
C) RadioButton
D) Label
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
Instructions entered in a form's ____ event procedure are processed when the application is started and the form is loaded into memory.

A) Load
B) Start
C) Begin
D) Call
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
Which of these can be used to determine if a student had earned a passing grade of an "A", "B", or "C", assuming that the grade is in the string variable grade?

A) grade Like "["A" or "B" or "C"]"
B) grade Like "['A' or 'B' or 'C']"
C) grade Like "[ABC]"
D) grade Like "A or B or C"
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
Which of these can be used to determine if a student had earned a grade of an "D" or "F", assuming that a grade of "A", "B", "C", "D" or "F" is in the string variable grade?

A) grade Like "["D" or "F"]"
B) grade Like "['F' or 'D']"
C) grade Like "[!ABC]"
D) grade Like "!A or !B or !C"
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
In a Case selection structure, each expression in an expression list is separated by a ____.

A) semicolon (;)
B) colon (:)
C) period (.)
D) comma (,)
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.