Deck 14: Creating Classes and Objects

ملء الشاشة (f)
exit full mode
سؤال
By convention, the names of the Private variables in a class start with a(n) ____.

A) slash ( / )
B) underscore ( _ )
C) pound sign ( # )
D) ampersand ( & )
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A(n) ____ can represent something found in real life, such as a wristwatch or a car.

A) object
B) property
C) method
D) argument
سؤال
____ are the operations (actions) that the object is capable of performing.

A) Objects
B) Events
C) Methods
D) Arguments
سؤال
Each object is an instance of the ____ from which it is created.

A) parameter
B) class
C) procedure
D) variable
سؤال
In OOP, the term ____ means to enclose in a class.

A) abstract
B) encapsulate
C) inherit
D) incorporate
سؤال
The Private variables of a class are visible to applications that contain an instance of the class.
سؤال
The Get statement begins with the keyword Get and ends with the keywords Return Get.
سؤال
____ are the actions to which an object can respond.

A) Objects
B) Events
C) Methods
D) Arguments
سؤال
The ____ of a class are most often represented by Private variables and Public properties.

A) objects
B) methods
C) behaviors
D) attributes
سؤال
In Visual Basic, you can define your own classes and then create instances from those classes.
سؤال
To instantiate a class-level object variable, you use the ____ keyword.

A) Public
B) Dim
C) Private
D) Property
سؤال
The only type of method which can be overloaded is a constructor.
سؤال
A(n) ____ encapsulates all of the attributes and behaviors of the object it instantiates.

A) argument
B) procedure
C) parameter
D) class
سؤال
The ____ of a class are represented by methods, which can be Sub or Function procedures.

A) behaviors
B) attributes
C) objects
D) parameters
سؤال
The Class statement begins with ____.

A) the keywords Start Class, followed by the name of the class
B) the name of the class, followed by the keywords Start Class
C) the keywords Public Class, followed by the name of the class
D) the name of the class, followed by the keywords Public Class
سؤال
The Class statement ends with the ____ clause.

A) End Class
B) Public Class
C) Exit Class
D) Dim Class
سؤال
In its simplest form, the Class statement can be used in place of the Structure statement.
سؤال
When a variable in a class is declared using the ____ keyword, it can be accessed by any application that contains an instance of the class.

A) Module
B) Private
C) Dim
D) Public
سؤال
The convention is to use ____ case for the names of the Public variables in a class.

A) Camel
B) Pascal
C) AllCaps
D) SmallCaps
سؤال
You use the ____ keyword to instantiate a procedure-level object variable.

A) Public
B) Dim
C) Private
D) Property
سؤال
A constructor begins with the keywords ____.

A) Public Sub New
B) Public Constructor
C) Private Constructor
D) Private New
سؤال
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Allows an application to assign a value to the Private variable associated with a property
سؤال
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Allows an application to retrieve the contents of the Private variable associated with a property
سؤال
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Used to declare a variable that is not visible to applications that contain an instance of the class
سؤال
The classes that you define must specify the attributes and ____________________ of the objects they create.
سؤال
You can write a(n) ____ as either a Function procedure or a Sub procedure.

A) attribute
B) method
C) parameter
D) Property procedure
سؤال
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Used in a Property procedure header to indicate that you are creating a property whose value can be retrieved by an application but cannot be set by the application
سؤال
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Characteristic that describes the object
سؤال
When an application needs to assign data to or retrieve data from a Private variable in a class, it must use a(n) ____ property to do so.

A) Private
B) Public
C) class
D) object
سؤال
The Set statement begins with the keyword Set and ends with the keywords ____.

A) End Set
B) Return Set
C) Complete Set
D) Exit Set
سؤال
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
سؤال
You should use ____ to name a property.

A) nouns and verbs
B) verbs
C) adverbs and adjectives
D) nouns and adjectives
سؤال
Constructors that contain parameters are called ____________________ constructors.
سؤال
____ enable you to specify the property of a class in one line of code.

A) System properties
B) Auto-implemented properties
C) Restricted properties
D) Class-delivered properties
سؤال
After you define a class, you can then use the class to instantiate one or more ____________________.
سؤال
A constructor that has no parameters is called the ____________________ constructor.
سؤال
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Can be used to create a Public property
سؤال
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Includes methods and events
سؤال
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Used to create an object
سؤال
An application cannot access the ____________________ variables in a class.
سؤال
How can you make the Private members of a class available to an application?
سؤال
What is meant by overloaded methods and when is overloading of methods useful?
سؤال
To allow for salaried employees that are paid on a schedule other than the standard, what is the header for the appropriate method to retrieve their gross salary?
سؤال
What is a method's signature?
سؤال
For the class Student, how you would create the auto-implemented string property of Firstname?
سؤال
What are the steps to add a class file to the current project?
سؤال
What are the rules for naming methods?
سؤال
Describe a Property procedure header.
سؤال
Although you can define a class that contains only attributes represented by Public variables, it is rarely done. Describe the disadvantage of using Public variables in a class.
سؤال
What is a constructor? What is the purpose of a constructor?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 14: Creating Classes and Objects
1
By convention, the names of the Private variables in a class start with a(n) ____.

A) slash ( / )
B) underscore ( _ )
C) pound sign ( # )
D) ampersand ( & )
B
2
A(n) ____ can represent something found in real life, such as a wristwatch or a car.

A) object
B) property
C) method
D) argument
A
3
____ are the operations (actions) that the object is capable of performing.

A) Objects
B) Events
C) Methods
D) Arguments
C
4
Each object is an instance of the ____ from which it is created.

A) parameter
B) class
C) procedure
D) variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
In OOP, the term ____ means to enclose in a class.

A) abstract
B) encapsulate
C) inherit
D) incorporate
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
The Private variables of a class are visible to applications that contain an instance of the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
The Get statement begins with the keyword Get and ends with the keywords Return Get.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
____ are the actions to which an object can respond.

A) Objects
B) Events
C) Methods
D) Arguments
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
The ____ of a class are most often represented by Private variables and Public properties.

A) objects
B) methods
C) behaviors
D) attributes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
In Visual Basic, you can define your own classes and then create instances from those classes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
To instantiate a class-level object variable, you use the ____ keyword.

A) Public
B) Dim
C) Private
D) Property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
The only type of method which can be overloaded is a constructor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
A(n) ____ encapsulates all of the attributes and behaviors of the object it instantiates.

A) argument
B) procedure
C) parameter
D) class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
The ____ of a class are represented by methods, which can be Sub or Function procedures.

A) behaviors
B) attributes
C) objects
D) parameters
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
The Class statement begins with ____.

A) the keywords Start Class, followed by the name of the class
B) the name of the class, followed by the keywords Start Class
C) the keywords Public Class, followed by the name of the class
D) the name of the class, followed by the keywords Public Class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
The Class statement ends with the ____ clause.

A) End Class
B) Public Class
C) Exit Class
D) Dim Class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
In its simplest form, the Class statement can be used in place of the Structure statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
When a variable in a class is declared using the ____ keyword, it can be accessed by any application that contains an instance of the class.

A) Module
B) Private
C) Dim
D) Public
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
The convention is to use ____ case for the names of the Public variables in a class.

A) Camel
B) Pascal
C) AllCaps
D) SmallCaps
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
You use the ____ keyword to instantiate a procedure-level object variable.

A) Public
B) Dim
C) Private
D) Property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
A constructor begins with the keywords ____.

A) Public Sub New
B) Public Constructor
C) Private Constructor
D) Private New
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Allows an application to assign a value to the Private variable associated with a property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Allows an application to retrieve the contents of the Private variable associated with a property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Used to declare a variable that is not visible to applications that contain an instance of the class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
The classes that you define must specify the attributes and ____________________ of the objects they create.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
You can write a(n) ____ as either a Function procedure or a Sub procedure.

A) attribute
B) method
C) parameter
D) Property procedure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Used in a Property procedure header to indicate that you are creating a property whose value can be retrieved by an application but cannot be set by the application
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Characteristic that describes the object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
When an application needs to assign data to or retrieve data from a Private variable in a class, it must use a(n) ____ property to do so.

A) Private
B) Public
C) class
D) object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
The Set statement begins with the keyword Set and ends with the keywords ____.

A) End Set
B) Return Set
C) Complete Set
D) Exit Set
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
You should use ____ to name a property.

A) nouns and verbs
B) verbs
C) adverbs and adjectives
D) nouns and adjectives
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
Constructors that contain parameters are called ____________________ constructors.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
____ enable you to specify the property of a class in one line of code.

A) System properties
B) Auto-implemented properties
C) Restricted properties
D) Class-delivered properties
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
After you define a class, you can then use the class to instantiate one or more ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
A constructor that has no parameters is called the ____________________ constructor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Can be used to create a Public property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Includes methods and events
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
Match each item with a statement below.
a.Property procedure
f.behavior
b.attribute
g.ReadOnly keyword
c.Set block
h.New keyword
d.Private keyword
i.WriteOnly keyword
e.Get block
Used to create an object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
An application cannot access the ____________________ variables in a class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
How can you make the Private members of a class available to an application?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
What is meant by overloaded methods and when is overloading of methods useful?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
To allow for salaried employees that are paid on a schedule other than the standard, what is the header for the appropriate method to retrieve their gross salary?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
What is a method's signature?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
For the class Student, how you would create the auto-implemented string property of Firstname?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
What are the steps to add a class file to the current project?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
What are the rules for naming methods?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
Describe a Property procedure header.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
Although you can define a class that contains only attributes represented by Public variables, it is rarely done. Describe the disadvantage of using Public variables in a class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
What is a constructor? What is the purpose of a constructor?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.