Deck 5: Decision Structures
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/112
العب
ملء الشاشة (f)
Deck 5: Decision Structures
1
To display a message box window like the one in the accompanying figure, use the ____ procedure of the MessageBox class.
A) Display
B) Show
C) View
D) Visible
A) Display
B) Show
C) View
D) Visible
B
2

A message box like the one shown in the accompanying figure is also known as a(n) ____ box.
A) alert
B) dialog
C) pop-up
D) warning
B
3
An If...Then statement can be used to compare an arithmetic expression to a(n) ____.
A) logical operator
B) constant
C) other data type
D) arithmetic operator
A) logical operator
B) constant
C) other data type
D) arithmetic operator
B, C
4
____ objects are used to gather related RadioButtons together so that the user can select one radio button from each group.
A) Container
B) Grouping
C) Layout
D) Cluster
A) Container
B) Grouping
C) Layout
D) Cluster
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
5
When a condition is tested in a Visual Basic program, this is a possible outcome: ____.
A) the condition cannot be determined
B) the condition is true
C) the condition is constant
D) the condition is false
A) the condition cannot be determined
B) the condition is true
C) the condition is constant
D) the condition is false
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
6
An If...Then statement can be used to compare two string values. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which of the following is a feature of the Panel object?
A) caption
B) labeled border
C) scroll bars
D) none of the above
A) caption
B) labeled border
C) scroll bars
D) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
8
The ____ object provides several options not available with the Panel object.
A) GroupBox
B) TabControl
C) FlowLayout
D) TableLayout
A) GroupBox
B) TabControl
C) FlowLayout
D) TableLayout
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
9
A RadioButton's Selected property will indicate if the radio button has been selected by the user. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
10
The plus sign is the operator for concatenation. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
11
A condition can be true and false at the same time. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
12
When using multiple ____ operators in an If statement, the order of precedence of the operators should be established through the use of parentheses.
A) relational
B) logical
C) concatenated
D) range
A) relational
B) logical
C) concatenated
D) range
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
13
When the object indicated by a RadioButton is selected by the user, the ____ property changes from False to True.
A) Selected
B) Value
C) Checked
D) Input
A) Selected
B) Value
C) Checked
D) Input
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
14
After the Not operator, the ____ logical operator has the next precedence.
A) And
B) Xor
C) AndAlso
D) Or
A) And
B) Xor
C) AndAlso
D) Or
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
15
Of all the following objects provided by Visual Basic for Windows applications, the ____ object is used most often.
A) GroupBox
B) TabControl
C) FlowLayout
D) TableLayout
A) GroupBox
B) TabControl
C) FlowLayout
D) TableLayout
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
16
The Panel, GroupBox, and TabControl objects are examples of ____ objects.
A) compound
B) container
C) complex
D) group
A) compound
B) container
C) complex
D) group
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
17
The ____ is a relational operator.
A) =
B) ?
C) >
D) <
A) =
B) ?
C) >
D) <
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
18
The Panel object performs in the same manner as the ____ object.
A) GroupBox
B) TabControl
C) FlowLayout
D) TableLayout
A) GroupBox
B) TabControl
C) FlowLayout
D) TableLayout
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
19
A ____ object forces the user to select only one option from a group of options.
A) CheckBox
B) RadioButton
C) TextBox
D) CheckList
A) CheckBox
B) RadioButton
C) TextBox
D) CheckList
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
20
In string comparison, a number is more than an uppercase letter. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
21
____ is the default setting for the buttons that will be displayed in a message box like the one in the accompanying figure.
A) MessageBoxButtons.OKOnly
B) MessageBoxButtons.OKCancel
C) MessageBoxButtons.YesNo
D) MessageBoxButtons.YesNoCancel
A) MessageBoxButtons.OKOnly
B) MessageBoxButtons.OKCancel
C) MessageBoxButtons.YesNo
D) MessageBoxButtons.YesNoCancel
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
22
The ____ of a variable is defined by where it is declared within a program.
A) range
B) life
C) versatility
D) scope
A) range
B) life
C) versatility
D) scope
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
23
A statement that tests a value is called a ____ statement.
A) conditional
B) scope
C) logical
D) range
A) conditional
B) scope
C) logical
D) range
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
24
A ____ structure is used to deal with different conditions that occur based on values entered into an application.
A) compound
B) logical
C) decision
D) baseline
A) compound
B) logical
C) decision
D) baseline
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
25
The business traveling rule, "If the flight costs less than $300.00 and the hotel is less than $120.00 per night" is an illustration of ____ conditions.
A) continuous
B) compound
C) contiguous
D) grouped
A) continuous
B) compound
C) contiguous
D) grouped
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
26
In an expression using the logical operator ____, as soon as one of the compound conditions is found to be false, no further conditions are tested and the expression evaluates to false.
A) Nor
B) AndAlso
C) OrElse
D) Xor
A) Nor
B) AndAlso
C) OrElse
D) Xor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
27
The logical operator ____ has the highest priority and is evaluated first.
A) Or
B) Xor
C) Not
D) And
A) Or
B) Xor
C) Not
D) And
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
28
To create a compound condition in an If statement, a(n) ____ operator is required.
A) compound
B) logical
C) arithmetic
D) logical
A) compound
B) logical
C) arithmetic
D) logical
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
29
To use multiple conditions in a single If...Then...Else statement, ____ conditions are required.
A) range
B) compound
C) indexed
D) logical
A) range
B) compound
C) indexed
D) logical
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
30
In an expression using the logical operator ____, as soon as one of the compound conditions is found to be true, no further conditions are tested and the expression evaluates to true.
A) Nor
B) AndAlso
C) OrElse
D) Xor
A) Nor
B) AndAlso
C) OrElse
D) Xor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
31
Every If statement block must be terminated by the ____ keyword.
A) End If
B) If End
C) End
D) Not If
A) End If
B) If End
C) End
D) Not If
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
32
The logical operator ____ reverses the logical value of a condition.
A) And
B) Or
C) Not
D) Nor
A) And
B) Or
C) Not
D) Nor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
33
Use the ____ statement to execute one set of instructions if the condition is true, and another set of instructions if the condition is false.
A) Do…While
B) If…Then
C) If...Then...Else
D) Not…If
A) Do…While
B) If…Then
C) If...Then...Else
D) Not…If
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
34
An expression using the logical operator ____ evaluates to true when only one but not both of the two compound conditions are true.
A) Nor
B) OrElse
C) AndAlso
D) Xor
A) Nor
B) OrElse
C) AndAlso
D) Xor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
35
The ampersand (&) symbol is the operator used to ____ two strings together.
A) link
B) display
C) embed
D) concatenate
A) link
B) display
C) embed
D) concatenate
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
36
In an If...Then statement, the ____ symbol is used to test for inequality.
A) ><
B) !=
C) = =
D) <>
A) ><
B) !=
C) = =
D) <>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
37
An expression using the logical operator ____ will evaluate to true only when both of the conditions are true.
A) And
B) Or
C) Not
D) Nor
A) And
B) Or
C) Not
D) Nor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
38
What is the value of the MsgBoxStyle.OKCancel?
A) 0
B) 1
C) 2
D) 3
A) 0
B) 1
C) 2
D) 3
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
39
What is the value of the MsgBoxStyle.OKOnly?
A) 0
B) 1
C) 2
D) 3
A) 0
B) 1
C) 2
D) 3
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
40
An expression using the logical operator ____ will evaluate to true when either of the compound conditions is true.
A) And
B) Or
C) Not
D) Nor
A) And
B) Or
C) Not
D) Nor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
41
Which of the following CANNOT be contained in a code snippet?
A) an entire program
B) code to send an e-mail message
C) an If…Then…Else decision structure
D) code to draw a circle
A) an entire program
B) code to send an e-mail message
C) an If…Then…Else decision structure
D) code to draw a circle
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
42
In an If...Then...Else statement, if the condition is false, the statements between the Else and End If keywords will be executed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
43
Visual Basic contains a code library of almost ____ pieces of code called code snippets, inserted by the command shown in the accompanying figure.
A) 125
B) 250
C) 500
D) 750
A) 125
B) 250
C) 500
D) 750
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
44
Statements for a true condition and statements for a false condition can both be executed based on a single comparison.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
45
To specify a continuous range of values to be tested in a Case statement within a Select Case structure, the word ____ must be used.
A) From
B) Range
C) To
D) Cont
A) From
B) Range
C) To
D) Cont
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
46
Developers can code Visual Basic applications to make decisions based on the input of users or other conditions that occur.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
47
A Panel object can have a caption, but a GroupBox object cannot.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
48
In an If...Then statement, the If keyword should appear on the first line with the conditional expression, and the Then keyword should appear on the second line.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
49
Often, during design time, you should set the Checked property for the most commonly selected RadioButton object to True to save the user from having to select the most common choice.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
50
The IsNumeric function will return a(n) ____ type value.
A) Boolean
B) Decimal
C) Double
D) Integer
A) Boolean
B) Decimal
C) Double
D) Integer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
51
Within an event handler, an If...Then...Else statement is considered a block of code.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
52
When RadioButton objects are contained in a group box, the user can select only one of the radio buttons on the panel.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
53
The ____ function is used to determine if an input value can be converted into a numeric value.
A) IsNumeric
B) IsNumber
C) IsInteger
D) IsQuantity
A) IsNumeric
B) IsNumber
C) IsInteger
D) IsQuantity
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
54
If data analyzed by the IsNumeric function cannot be converted to a numeric data type, the function will return a value of ____.
A) NaN
B) NotNumber
C) False
D) null
A) NaN
B) NotNumber
C) False
D) null
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
55
When comparing two data values in Visual Basic, both values must be the same data type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
56
When you want to move a GroupBox object, you must first move its contained objects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
57
To end a Select Case structure, a(n) ____ statement is used.
A) End Select
B) End Case
C) Select End
D) Select Close
A) End Select
B) End Case
C) Select End
D) Select Close
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
58
When relational operators are used in a Case statement within a Select Case structure, the keyword ____ must be used with the relational operator.
A) Is
B) From
C) Cont
D) To
A) Is
B) From
C) Cont
D) To
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
59
It is important to ____ the line in the code editing window in the exact location where you want to insert a code snippet to produce the shortcut menu with the Insert Snippet command.
A) click
B) double-click
C) right-click
D) mouse over
A) click
B) double-click
C) right-click
D) mouse over
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
60
In a Select Case structure, the ____ statement includes all conditions not specifically tested for in the other Case statements.
A) Case Other
B) Else
C) Case Else
D) All Else
A) Case Other
B) Else
C) Case Else
D) All Else
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
61
A variable defined between the Then keyword and the Else keyword in an If...Then...Else structure can be referenced from within the Else section of the structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
62
You can display a code snippet to ensure you understand the syntax and requirements for a given type of statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
63
An End Case statement is used to terminate a Select Case structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
64
____________________ is the MsgBoxButtons argument that, after an error occurs, allows the user to choose Retry or Cancel.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
65
A Case statement in a Select Case structure can test for a range of values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
66
In the era of IntelliSense, developers need no longer anticipate that users will enter invalid data.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
67
Only one condition can be tested in an If statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
68
Each code snippet inserted by the command in the accompanying figure consists of a complete programming task.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
69
The process of validating input data is fundamental to programming when using a graphical user interface.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
70
The default setting for the MessageBoxButtons argument of a message box will display only a(n) ____________________ button in the message box.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
71
Variables declared within a block of code can only be referenced within that block.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
72

Message boxes like the ones in the accompanying figure also are known as ____________________ boxes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
73
____________________ is the MsgBoxButtons argument that displays the Yes and No buttons.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
74
In adding a code snippet, if you right-click outside the desired location for your code, the shortcut menu might list choices that are customized to that area of code and not include the code snippet for which you were searching.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
75
If a program attempts to process invalid data, unexpected errors can occur.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
76
The ____________________ procedure found in the MessageBox class is used to display a message box, like the one in the accompanying figure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
77
A Case Else statement is required in a Select Case structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
78
In a Select Case statement, the keyword Is must be used when testing with relational operators.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
79
Each value in a Case statement is separated by a period.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck
80
You can create your own code snippets but they cannot be added to the library.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 112 في هذه المجموعة.
فتح الحزمة
k this deck