Deck 7: Using Procedures and Exception Handling
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/103
العب
ملء الشاشة (f)
Deck 7: Using Procedures and Exception Handling
1
A Sub procedure can return ____ value(s) to the calling procedure.
A) 0
B) 1
C) 2
D) 3
A) 0
B) 1
C) 2
D) 3
A
2
To change the copyright date on a splash screen, you need to open the ____ Information dialog box.
A) Assembly
B) ActiveX
C) Activity
D) Argument
A) Assembly
B) ActiveX
C) Activity
D) Argument
A
3
The word ____ is placed before the Sub keyword when creating a Sub procedure to specify that the procedure can be called only by code within the class in which it exists.
A) Contained
B) Private
C) Inner
D) Distinct
A) Contained
B) Private
C) Inner
D) Distinct
B
4
The ____ event of a ComboBox object is triggered when the user changes the selection.
A) SelectedIndex
B) IndexChanged
C) SelectedIndexChanged
D) ChangedSelectedIndex
A) SelectedIndex
B) IndexChanged
C) SelectedIndexChanged
D) ChangedSelectedIndex
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
5
If the user selects the first item in a ComboBox, the SelectedIndex property will have the value ____.
A) −1
B) 0
C) 1
D) 2
A) −1
B) 0
C) 1
D) 2
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
6
A ____ screen can be added to engage the user while the application is loading.
A) startup
B) flash
C) title
D) splash
A) startup
B) flash
C) title
D) splash
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
7
To execute code in a procedure, a procedure ____ must be made.
A) invocation
B) cast
C) call
D) metric
A) invocation
B) cast
C) call
D) metric
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
8
The ____ property allows you to change the generic graphic on the splash screen.
A) BackGround
B) BackImage
C) BackgroundImage
D) BackGroundPicture
A) BackGround
B) BackImage
C) BackgroundImage
D) BackGroundPicture
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
9
The Project ____ appears as a single window in the Visual Studio IDE.
A) Manager
B) Control
C) Designer
D) Application
A) Manager
B) Control
C) Designer
D) Application
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
10
To pause a splash screen for a specific time period, you can call the ____ procedure.
A) Suspend
B) Sleep
C) Pause
D) Halt
A) Suspend
B) Sleep
C) Pause
D) Halt
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
11
A(n) ____ is a named set of code that performs a given task.
A) parameter
B) procedure
C) argument
D) index
A) parameter
B) procedure
C) argument
D) index
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
12
The ____ property of a ComboBox object returns a string value that represents the selected list item.
A) SelectedItem
B) ListItem
C) ThisItem
D) NewIndex
A) SelectedItem
B) ListItem
C) ThisItem
D) NewIndex
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
13
In a payroll program, a user could enter the number of hours worked, pay rate, and then select whether he or she are a full-time or part-time employee to submit his or her input. This last selection is an example of using a ComboBox object to handle a(n) ____.
A) value action
B) return index
C) decision tree
D) event
A) value action
B) return index
C) decision tree
D) event
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
14
If the third item in a ComboBox list is selected by the user, the SelectedIndex property of the ComboBox will have the value ____.
A) 1
B) 2
C) 3
D) 4
A) 1
B) 2
C) 3
D) 4
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
15
Arguments are contained inside ____ after the name of the procedure to be called.
A) braces
B) parentheses
C) brackets
D) quotation marks
A) braces
B) parentheses
C) brackets
D) quotation marks
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
16
The Project Designer provides a central location for managing project ____.
A) properties
B) settings
C) resources
D) all of the above
A) properties
B) settings
C) resources
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
17
A ____ procedure completes its task but does not return any data to the calling procedure.
A) Private
B) Sub
C) Function
D) Public
A) Private
B) Sub
C) Function
D) Public
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
18
The ____ prefix is used when naming a ComboBox object.
A) cmb
B) cbo
C) cbx
D) cmo
A) cmb
B) cbo
C) cbx
D) cmo
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
19
The index number of a ComboBox object can be assigned to a(n) ____ data type variable.
A) Decimal
B) Integer
C) Whole
D) Null
A) Decimal
B) Integer
C) Whole
D) Null
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
20
Using the ____ procedure will cause the application to pause a specific amount of time.
A) Stop
B) Pause
C) Wait
D) Sleep
A) Stop
B) Pause
C) Wait
D) Sleep
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
21
The ____ exception type occurs when a value exceeds its assigned data type.
A) NullReferenceException
B) ArgumentNullException
C) OverflowException
D) SystemException
A) NullReferenceException
B) ArgumentNullException
C) OverflowException
D) SystemException
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
22
When an argument is passed ____, it means the Sub procedure has access to the value of the passed argument, but does not actually reference the variable declared in the calling procedure.
A) ByRef
B) ByHand
C) ByVal
D) ByVar
A) ByRef
B) ByHand
C) ByVal
D) ByVar
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
23
The ____ exception type occurs when a procedure is called and the result is not possible.
A) NullReferenceException
B) ArgumentNullException
C) OverflowException
D) SystemException
A) NullReferenceException
B) ArgumentNullException
C) OverflowException
D) SystemException
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
24
In a Try-Catch structure, the ____ statement is optional and always executes last.
A) Final
B) Finally
C) Last
D) End
A) Final
B) Finally
C) Last
D) End
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
25
A variable declared as Private at the ____ level can be accessed by procedures and events within the class but not by any code outside of the class.
A) block
B) local
C) global
D) class
A) block
B) local
C) global
D) class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
26
When a procedure is called, the call statement can pass a(n) ____ to the called procedure.
A) parameter
B) sub
C) index
D) argument
A) parameter
B) sub
C) index
D) argument
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
27
The ____ structure can be used to detect exceptions and take corrective action.
A) Try-Catch
B) Try-Code
C) Catch-Error
D) Try-CatchError
A) Try-Catch
B) Try-Code
C) Catch-Error
D) Try-CatchError
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
28
In a Function procedure, the ____ of the return value is listed in the procedure declaration.
A) data type
B) parameter
C) limit
D) index
A) data type
B) parameter
C) limit
D) index
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
29
The ____ exception type occurs when a value is divided by zero.
A) DivisionError
B) ZeroError
C) DivideByZeroException
D) ZeroDivisionError
A) DivisionError
B) ZeroError
C) DivideByZeroException
D) ZeroDivisionError
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
30
The keyword(s) ____ is/are used to specify the termination of a Try-Catch block of code.
A) Terminate
B) Conclude
C) End Try
D) Quit Catch
A) Terminate
B) Conclude
C) End Try
D) Quit Catch
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
31
A Try-Catch structure ____ Catch blocks of code.
A) cannot contain any
B) can contain one
C) can contain at most two
D) can contain any number of
A) cannot contain any
B) can contain one
C) can contain at most two
D) can contain any number of
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
32
The ____ exception type is used to catch all generic exceptions within a Try-Catch structure.
A) NullReferenceException
B) ArgumentNullException
C) OverflowException
D) SystemException
A) NullReferenceException
B) ArgumentNullException
C) OverflowException
D) SystemException
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
33
When an argument is passed ____, you are passing a reference to the variable that holds the value instead of the value itself.
A) ByRef
B) ByHand
C) ByVal
D) ByVar
A) ByRef
B) ByHand
C) ByVal
D) ByVar
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
34
After the Sub procedure has completed its execution, program control returns to the ___________ and program execution resumes.
A) execution procedure
B) sub procedure
C) pass argument
D) calling procedure
A) execution procedure
B) sub procedure
C) pass argument
D) calling procedure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
35
A ____ procedure returns a single value to the calling procedure.
A) Form
B) Sub
C) Function
D) Splash
A) Form
B) Sub
C) Function
D) Splash
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
36
The ____ exception type occurs when a variable is converted to another data type that is not possible.
A) TypeException
B) TypeMismatchException
C) FormatMismatchException
D) FormatException
A) TypeException
B) TypeMismatchException
C) FormatMismatchException
D) FormatException
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
37
To return multiple variables from a Function procedure, arguments passed ____ must be used.
A) ByVal
B) BySub
C) ByRef
D) ByArg
A) ByVal
B) BySub
C) ByRef
D) ByArg
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
38
The keyword ____ is used in a Function procedure to return a single value.
A) SendVal
B) Return
C) ReturnVal
D) ReturnValue
A) SendVal
B) Return
C) ReturnVal
D) ReturnValue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
39
The ____ exception type occurs when a variable with no value is passed to a procedure.
A) NullReferenceException
B) ArgumentNullException
C) OverflowException
D) SystemException
A) NullReferenceException
B) ArgumentNullException
C) OverflowException
D) SystemException
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
40
A Function procedure can pass back ____ value(s) using the Return statement to the calling procedure.
A) 0
B) 1
C) 2
D) 3
A) 0
B) 1
C) 2
D) 3
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
41
____ is an exception type that can be handled by a Try-Catch block.
A) TextException
B) DivideByZeroException
C) OverflowException
D) FormatException
A) TextException
B) DivideByZeroException
C) OverflowException
D) FormatException
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
42
A dollar sign ($) as the first character in a variable means it is a class variable that can be referenced in any procedure within the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
43
The Elements of a ComboBox displays a list of items from which the user can select one item.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
44
Tap or click the list arrow on the left side of a ComboBox object to view the contents. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
45
____ procedures are a kind of procedure provided by Visual Basic.
A) Integrated
B) Master
C) Sub
D) Function
A) Integrated
B) Master
C) Sub
D) Function
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
46
A Sub procedure does not return any data to the calling procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
47
A splash screen can be used to make a program appear to load faster than it actually does. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
48
A ComboBox object consists of three parts. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
49
A Sub procedure is called with a statement consisting of ____.
A) the title of the program
B) the procedure name
C) the master variable
D) a set of parentheses
A) the title of the program
B) the procedure name
C) the master variable
D) a set of parentheses
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
50
You specify you want to pass a value by reference by entering the keyword ByRef in the Sub procedure declaration.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
51
The Project Designer provides a central location for managing ____.
A) project properties
B) settings
C) resources
D) applications
A) project properties
B) settings
C) resources
D) applications
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
52
To make a splash screen display for a certain period of time, the Suspend procedure is placed in the form load event handler. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
53
The ____ object can trigger a SelectedIndexChanged event when a selection is made.
A) ComboBox
B) DropDownList
C) SelectionBox
D) ListBox
A) ComboBox
B) DropDownList
C) SelectionBox
D) ListBox
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
54
When you pass a variable as an argument that was declared with the ByVal keyword in a procedure, that procedure cannot change the original value of the variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
55
After a Sub procedure has completed its execution, program control returns to the calling procedure and program execution resumes in the calling procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
56
Sub procedures are automatically executed when events such as the user clicking a button occur.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
57
When the SelectedIndex property of a ComboBox has the value of 0, it indicates that no selection was made by the user.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
58
The SelectedItem property of a ComboBox returns an integer indicating which choice is currently selected.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
59
The keyword End SubProcedure signifies the end of a Sub procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
60
You should select the ByVal option if you intend to change the original value when it is passed to the Sub procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
61
If an exception occurs in the Try section of a Try-Catch structure and there is no matching Catch block, the program will stop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
62
The Private keyword is required in a Function procedure declaration.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
63
You can pass no more than two arguments to a Sub procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
64
A DivideByZeroException occurs when a value is divided by zero.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
65
The ____________________ property is used to return the string value of the selected choice in a ComboBox.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
66
A Function procedure can pass many values back to the calling procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
67
If the Private keyword is omitted, the default option is Public.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
68
A Finally statement is required after each Catch block in a Try-Catch structure to execute any necessary cleanup code.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
69
If the code in the Try section of a Try-Catch structure generates an error, the program will not be terminated when the exception occurs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
70
You must specify a return data type in the procedure declaration to define the type of variable that is being returned to the calling procedure by the Function procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
71
If a Sub procedure has more than one argument, the variables are passed in the same order in which they appear in the procedure call statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
72
The ____________________ property is used to display a graphic on a splash screen.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
73
Only six different types of exceptions can occur in a Visual Basic program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
74
A(n) ____________________ object includes a text box that allows the user to enter text, and a list box that displays a list of items from which the user can select one.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
75
An opening screen that appears as an application is loading is called a(n) ----____________________ screen.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
76
The statement End Procedure is used to signify the end of a Function declaration.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
77
The ____________________ property of a ComboBox is assigned a number that represents the selected item.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
78
A Function procedure returns a single value to the calling procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
79
In a Function procedure declaration, any lines of code after a Return statement will not be executed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck
80
You cannot exclude the receiving variable in the procedure call.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 103 في هذه المجموعة.
فتح الحزمة
k this deck