Deck 11: Classes and Objects

ملء الشاشة (f)
exit full mode
سؤال
The code in the Get block allows the application to assign a value to the Private variable.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The sole purpose of a constructor is to initialize the class's variables.
سؤال
Two constructors in a class can have the same parameters.
سؤال
Constructors must be Function procedures.
سؤال
Using a Public property to assign a value received from a program ensures that the Set block is processed.
سؤال
All the words in a method name should be verbs.
سؤال
When you use a class to create an object in an application, the procedures declared using the Private keyword are hidden from the application.
سؤال
When you use a class to create an object in an application, variables declared using both the Public keyword and the Private keyword are made available to the application.
سؤال
The Class statement is entered in a class file.
سؤال
The methods of an object describe its characteristics.
سؤال
The Class statement begins with the keywords Private Class.
سؤال
You can enter only one instruction within a Set statement.
سؤال
A method that is not a constructor can be either a Sub procedure or a Function procedure.
سؤال
By convention, the first letter of each word in a method name should be capitalized.
سؤال
Every class should have at least one constructor.
سؤال
The methods in a class cannot reference the class's Private variables directly; they must reference the Private variables indirectly through the Public properties.
سؤال
By convention, most programmers capitalize the first letter in a class name.
سؤال
A statement that is used to create an object from a class must begin with the Dim keyword.
سؤال
You should always use a Public property to assign a value received from a program.
سؤال
The Get block of a Public property typically contains the validation code.
سؤال
A Property procedure begins with the keywords ____.

A) Public Property
B) Private Property
C) Start Property
D) Dim Property
سؤال
The default constructor has ____ parameter(s).

A) 0
B) 1
C) 2
D) n
سؤال
After an object is created and its address assigned to a variable, you can access its properties using the syntax ____.

A) objectVariable ( property )
B) objectVariable . property
C) objectVariable (). property
D) objectVariable [ property ]
سؤال
The data type of a Property procedure must match the data type of the Private variable associated with the Property procedure.
سؤال
The Get statement begins with the keywords Start Get.
سؤال
The code contained in the ____ block allows an application to retrieve the contents of the Private variable associated with the property.

A) Set
B) Assign
C) New
D) Get
سؤال
A ____ is a method whose instructions the computer processes, automatically, each time an object is created from the class.

A) structure
B) designer
C) loader
D) constructor
سؤال
By convention, the first letter of each word in a property name should be capitalized.
سؤال
Within the Property procedure you define a Get block of code and a(n) ____ block of code.

A) Retrieve
B) Set
C) New
D) Assign
سؤال
The properties of an object allow the object to perform tasks.
سؤال
You create a Public property using a Property ____.

A) variable
B) procedure
C) constructor
D) class
سؤال
When an application needs to assign data to or retrieve data from a Private variable in a class, it must use a Public ____ to do so.

A) parameter
B) constructor
C) argument
D) property
سؤال
When a property is declared using the ____ keyword, it can be accessed by any application that uses an object created from the class.

A) Public
B) Private
C) Protected
D) Friend
سؤال
Each constructor included in a class has the name ____.

A) Get
B) Set
C) New
D) Start
سؤال
A variable that is declared with the ____ keyword can be used only by the class in which it is defined.

A) Public
B) Protected
C) Friend
D) Private
سؤال
Objects are created, or instantiated, from ____.

A) methods
B) properties
C) variables
D) classes
سؤال
You can define a class that contains properties only.
سؤال
The Class statement ends with the keyword(s) ____.

A) Class
B) Exit Class
C) End Class
D) Next Class
سؤال
A Property procedure ends with the keyword(s) ____.

A) Property
B) Exit Property
C) End Property
D) Next Property
سؤال
The Set statement begins with the keyword ____.

A) Set
B) Public Set
C) Start Set
D) Private Set
سؤال
A ____ encapsulates the attributes and behaviors of the object it creates.

A) constructor
B) property
C) class
D) structure
سؤال
The Return privateVariable instruction is entered in ____.

A) the default constructor
B) a constructor other than the default constructor
C) a Get block
D) a Set block
سؤال
The first word in a method name should be a(n) ____.

A) verb
B) noun
C) adjective
D) preposition
سؤال
The Get statement ends with the keyword(s) ____.

A) Get
B) End Get
C) Exit Get
D) Next Get
سؤال
You should use ____ to name a property.

A) nouns only
B) adjectives only
C) verbs only
D) nouns and adjectives
سؤال
In the following instruction, Room is a(n) ____. Dim bedroom As New Room

A) object
B) variable
C) class
D) property
سؤال
A text box is created from the TextBox ____.

A) object
B) class
C) method
D) property
سؤال
A ____ initializes the class's variables.

A) constructor
B) Public property
C) Set block
D) Get block
سؤال
The ____ privateVariable instruction directs the computer to return the contents of the Private variable.

A) Send
B) Throw
C) Pass
D) Return
سؤال
In the Set statement, a parameter is enclosed in ____.

A) brackets
B) quotation marks
C) braces
D) parentheses
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 11: Classes and Objects
1
The code in the Get block allows the application to assign a value to the Private variable.
False
2
The sole purpose of a constructor is to initialize the class's variables.
True
3
Two constructors in a class can have the same parameters.
False
4
Constructors must be Function procedures.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
Using a Public property to assign a value received from a program ensures that the Set block is processed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
All the words in a method name should be verbs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
When you use a class to create an object in an application, the procedures declared using the Private keyword are hidden from the application.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
When you use a class to create an object in an application, variables declared using both the Public keyword and the Private keyword are made available to the application.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
The Class statement is entered in a class file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
The methods of an object describe its characteristics.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
The Class statement begins with the keywords Private Class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
You can enter only one instruction within a Set statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
A method that is not a constructor can be either a Sub procedure or a Function procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
By convention, the first letter of each word in a method name should be capitalized.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
Every class should have at least one constructor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
The methods in a class cannot reference the class's Private variables directly; they must reference the Private variables indirectly through the Public properties.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
By convention, most programmers capitalize the first letter in a class name.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
A statement that is used to create an object from a class must begin with the Dim keyword.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
You should always use a Public property to assign a value received from a program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
The Get block of a Public property typically contains the validation code.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
A Property procedure begins with the keywords ____.

A) Public Property
B) Private Property
C) Start Property
D) Dim Property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
The default constructor has ____ parameter(s).

A) 0
B) 1
C) 2
D) n
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
After an object is created and its address assigned to a variable, you can access its properties using the syntax ____.

A) objectVariable ( property )
B) objectVariable . property
C) objectVariable (). property
D) objectVariable [ property ]
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
The data type of a Property procedure must match the data type of the Private variable associated with the Property procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
The Get statement begins with the keywords Start Get.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
The code contained in the ____ block allows an application to retrieve the contents of the Private variable associated with the property.

A) Set
B) Assign
C) New
D) Get
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
A ____ is a method whose instructions the computer processes, automatically, each time an object is created from the class.

A) structure
B) designer
C) loader
D) constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
By convention, the first letter of each word in a property name should be capitalized.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
Within the Property procedure you define a Get block of code and a(n) ____ block of code.

A) Retrieve
B) Set
C) New
D) Assign
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
The properties of an object allow the object to perform tasks.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
You create a Public property using a Property ____.

A) variable
B) procedure
C) constructor
D) class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
When an application needs to assign data to or retrieve data from a Private variable in a class, it must use a Public ____ to do so.

A) parameter
B) constructor
C) argument
D) property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
When a property is declared using the ____ keyword, it can be accessed by any application that uses an object created from the class.

A) Public
B) Private
C) Protected
D) Friend
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
Each constructor included in a class has the name ____.

A) Get
B) Set
C) New
D) Start
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
A variable that is declared with the ____ keyword can be used only by the class in which it is defined.

A) Public
B) Protected
C) Friend
D) Private
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
Objects are created, or instantiated, from ____.

A) methods
B) properties
C) variables
D) classes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
You can define a class that contains properties only.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
The Class statement ends with the keyword(s) ____.

A) Class
B) Exit Class
C) End Class
D) Next Class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
A Property procedure ends with the keyword(s) ____.

A) Property
B) Exit Property
C) End Property
D) Next Property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
The Set statement begins with the keyword ____.

A) Set
B) Public Set
C) Start Set
D) Private Set
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
A ____ encapsulates the attributes and behaviors of the object it creates.

A) constructor
B) property
C) class
D) structure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
The Return privateVariable instruction is entered in ____.

A) the default constructor
B) a constructor other than the default constructor
C) a Get block
D) a Set block
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
The first word in a method name should be a(n) ____.

A) verb
B) noun
C) adjective
D) preposition
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
The Get statement ends with the keyword(s) ____.

A) Get
B) End Get
C) Exit Get
D) Next Get
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
You should use ____ to name a property.

A) nouns only
B) adjectives only
C) verbs only
D) nouns and adjectives
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
In the following instruction, Room is a(n) ____. Dim bedroom As New Room

A) object
B) variable
C) class
D) property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
A text box is created from the TextBox ____.

A) object
B) class
C) method
D) property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
A ____ initializes the class's variables.

A) constructor
B) Public property
C) Set block
D) Get block
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
The ____ privateVariable instruction directs the computer to return the contents of the Private variable.

A) Send
B) Throw
C) Pass
D) Return
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
In the Set statement, a parameter is enclosed in ____.

A) brackets
B) quotation marks
C) braces
D) parentheses
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.