Deck 15: Creating Classes and Objects

Full screen (f)
exit full mode
Question
A(n) ____ encapsulates all of the attributes and behaviors of the object it instantiates.

A) argument
B) procedure
C) parameter
D) class
Use Space or
up arrow
down arrow
to flip the card.
Question
The only type of method which can be overloaded is a constructor.
Question
In its simplest form, the Class statement can be used in place of the Structure statement.
Question
The ____ of a class are represented by methods, which can be Sub or Function procedures.

A) behaviors
B) attributes
C) objects
D) parameters
Question
Each object is an instance of the ____ from which it is created.

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

A) abstract
B) encapsulate
C) inherit
D) incorporate
Question
A(n) ____ can represent something found in real life, such as a wristwatch or a car.

A) object
B) property
C) method
D) argument
Question
The convention is to use ____ case for the names of the Public variables in a class.

A) Camel
B) Pascal
C) AllCaps
D) SmallCaps
Question
By convention, the names of the Private variables in a class start with a(n) ____.

A) slash ( / )
B) underscore ( _ )
C) pound sign ( # )
D) ampersand ( & )
Question
____ are the operations (actions) that the object is capable of performing.

A) Objects
B) Events
C) Methods
D) Arguments
Question
____ are the actions to which an object can respond.

A) Objects
B) Events
C) Methods
D) Arguments
Question
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
Question
The Get statement begins with the keyword Get and ends with the keywords Return Get .
Question
The Class statement ends with the ____ clause.

A) E nd Class
B) Public Class
C) Exit Class
D) Dim Class
Question
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
Question
To instantiate a class-level object variable, you use the ____ keyword.

A) Public
B) Dim
C) Private
D) Property
Question
You use the ____ keyword to instantiate a procedure-level object variable.

A) Public
B) Dim
C) Private
D) Property
Question
In Visual Basic, you can define your own classes and then create instances from those classes.
Question
The Private variables of a class are visible to applications that contain an instance of the class.
Question
The ____ of a class are most often represented by Private variables and Public properties.

A) objects
B) methods
C) behaviors
D) attributes
Question
For the class Student , how you would create the auto-implemented string property of Firstname ?
Question
How can you make the Private members of a class available to an application?
Question
Constructors that contain parameters are called ____________________ constructors.
Question
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
Question
A class contains all of the attributes and ____________________ of the object it instantiates.
Question
____ 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
Question
What are the steps to add a class file to the current project?
Question
After you define a class, you can then use the class to instantiate one or more ____________________.
Question
You can write a(n) ____ as either a Function procedure or a Sub procedure.

A) attribute
B) method
C) parameter
D) Property procedure
Question
An application cannot directly refer to the ____________________ variables in a class.
Question
What is an advantage of object-oriented programming?
Question
A constructor that has no parameters is called the ____________________ constructor.
Question
Describe what the  Get block and Set block does.
Question
What are the rules for naming methods?
Question
What is a constructor? What is the purpose of a constructor?
Question
You should use ____ to name a property.

A) nouns and verbs
B) verbs
C) adverbs and adjectives
D) nouns and adjectives
Question
What is a method's signature?
Question
A constructor begins with the keywords ____.

A) Public Sub New
B) Public Constructor
C) Private Constructor
D) Private New
Question
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.
Question
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
Question
Match between columns
Includes methods and events
attributes
Includes methods and events
behaviors
Includes methods and events
New keyword
Includes methods and events
Private keyword
Includes methods and events
Property procedure
Includes methods and events
ReadOnly keyword
Includes methods and events
WriteOnly keyword
Includes methods and events
Get block
Includes methods and events
Set block
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
attributes
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
behaviors
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
New keyword
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
Private keyword
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
Property procedure
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
ReadOnly keyword
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
WriteOnly keyword
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
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
Set block
Used to declare a variable that is not visible to applications that contain an instance of the class
attributes
Used to declare a variable that is not visible to applications that contain an instance of the class
behaviors
Used to declare a variable that is not visible to applications that contain an instance of the class
New keyword
Used to declare a variable that is not visible to applications that contain an instance of the class
Private keyword
Used to declare a variable that is not visible to applications that contain an instance of the class
Property procedure
Used to declare a variable that is not visible to applications that contain an instance of the class
ReadOnly keyword
Used to declare a variable that is not visible to applications that contain an instance of the class
WriteOnly keyword
Used to declare a variable that is not visible to applications that contain an instance of the class
Get block
Used to declare a variable that is not visible to applications that contain an instance of the class
Set block
Used to create an object
attributes
Used to create an object
behaviors
Used to create an object
New keyword
Used to create an object
Private keyword
Used to create an object
Property procedure
Used to create an object
ReadOnly keyword
Used to create an object
WriteOnly keyword
Used to create an object
Get block
Used to create an object
Set block
Allows an application to assign a value to the Private variable associated with a property
attributes
Allows an application to assign a value to the Private variable associated with a property
behaviors
Allows an application to assign a value to the Private variable associated with a property
New keyword
Allows an application to assign a value to the Private variable associated with a property
Private keyword
Allows an application to assign a value to the Private variable associated with a property
Property procedure
Allows an application to assign a value to the Private variable associated with a property
ReadOnly keyword
Allows an application to assign a value to the Private variable associated with a property
WriteOnly keyword
Allows an application to assign a value to the Private variable associated with a property
Get block
Allows an application to assign a value to the Private variable associated with a property
Set block
Allows an application to retrieve the contents of the Private variable associated with a property
attributes
Allows an application to retrieve the contents of the Private variable associated with a property
behaviors
Allows an application to retrieve the contents of the Private variable associated with a property
New keyword
Allows an application to retrieve the contents of the Private variable associated with a property
Private keyword
Allows an application to retrieve the contents of the Private variable associated with a property
Property procedure
Allows an application to retrieve the contents of the Private variable associated with a property
ReadOnly keyword
Allows an application to retrieve the contents of the Private variable associated with a property
WriteOnly keyword
Allows an application to retrieve the contents of the Private variable associated with a property
Get block
Allows an application to retrieve the contents of the Private variable associated with a property
Set block
Can be used to create a Public property
attributes
Can be used to create a Public property
behaviors
Can be used to create a Public property
New keyword
Can be used to create a Public property
Private keyword
Can be used to create a Public property
Property procedure
Can be used to create a Public property
ReadOnly keyword
Can be used to create a Public property
WriteOnly keyword
Can be used to create a Public property
Get block
Can be used to create a Public property
Set 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
attributes
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
behaviors
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
New keyword
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
Private keyword
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
Property procedure
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
ReadOnly keyword
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
WriteOnly keyword
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
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
Set block
Characteristics that describes the object
attributes
Characteristics that describes the object
behaviors
Characteristics that describes the object
New keyword
Characteristics that describes the object
Private keyword
Characteristics that describes the object
Property procedure
Characteristics that describes the object
ReadOnly keyword
Characteristics that describes the object
WriteOnly keyword
Characteristics that describes the object
Get block
Characteristics that describes the object
Set block
Question
What is meant by overloaded methods and when is overloading of methods useful?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/42
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 15: Creating Classes and Objects
1
A(n) ____ encapsulates all of the attributes and behaviors of the object it instantiates.

A) argument
B) procedure
C) parameter
D) class
D
2
The only type of method which can be overloaded is a constructor.
False
3
In its simplest form, the Class statement can be used in place of the Structure statement.
True
4
The ____ of a class are represented by methods, which can be Sub or Function procedures.

A) behaviors
B) attributes
C) objects
D) parameters
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
5
Each object is an instance of the ____ from which it is created.

A) parameter
B) class
C) procedure
D) variable
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
6
In OOP, the term ____ means to enclose in a class.

A) abstract
B) encapsulate
C) inherit
D) incorporate
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
7
A(n) ____ can represent something found in real life, such as a wristwatch or a car.

A) object
B) property
C) method
D) argument
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
8
The convention is to use ____ case for the names of the Public variables in a class.

A) Camel
B) Pascal
C) AllCaps
D) SmallCaps
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
9
By convention, the names of the Private variables in a class start with a(n) ____.

A) slash ( / )
B) underscore ( _ )
C) pound sign ( # )
D) ampersand ( & )
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
10
____ are the operations (actions) that the object is capable of performing.

A) Objects
B) Events
C) Methods
D) Arguments
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
11
____ are the actions to which an object can respond.

A) Objects
B) Events
C) Methods
D) Arguments
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
12
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
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
13
The Get statement begins with the keyword Get and ends with the keywords Return Get .
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
14
The Class statement ends with the ____ clause.

A) E nd Class
B) Public Class
C) Exit Class
D) Dim Class
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
16
To instantiate a class-level object variable, you use the ____ keyword.

A) Public
B) Dim
C) Private
D) Property
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
17
You use the ____ keyword to instantiate a procedure-level object variable.

A) Public
B) Dim
C) Private
D) Property
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
18
In Visual Basic, you can define your own classes and then create instances from those classes.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
19
The Private variables of a class are visible to applications that contain an instance of the class.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
20
The ____ of a class are most often represented by Private variables and Public properties.

A) objects
B) methods
C) behaviors
D) attributes
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
21
For the class Student , how you would create the auto-implemented string property of Firstname ?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
22
How can you make the Private members of a class available to an application?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
23
Constructors that contain parameters are called ____________________ constructors.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
24
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
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
25
A class contains all of the attributes and ____________________ of the object it instantiates.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
26
____ 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
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
27
What are the steps to add a class file to the current project?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
28
After you define a class, you can then use the class to instantiate one or more ____________________.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
29
You can write a(n) ____ as either a Function procedure or a Sub procedure.

A) attribute
B) method
C) parameter
D) Property procedure
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
30
An application cannot directly refer to the ____________________ variables in a class.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
31
What is an advantage of object-oriented programming?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
32
A constructor that has no parameters is called the ____________________ constructor.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
33
Describe what the  Get block and Set block does.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
34
What are the rules for naming methods?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
35
What is a constructor? What is the purpose of a constructor?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
36
You should use ____ to name a property.

A) nouns and verbs
B) verbs
C) adverbs and adjectives
D) nouns and adjectives
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
37
What is a method's signature?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
38
A constructor begins with the keywords ____.

A) Public Sub New
B) Public Constructor
C) Private Constructor
D) Private New
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
39
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.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
40
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
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
41
Match between columns
Includes methods and events
attributes
Includes methods and events
behaviors
Includes methods and events
New keyword
Includes methods and events
Private keyword
Includes methods and events
Property procedure
Includes methods and events
ReadOnly keyword
Includes methods and events
WriteOnly keyword
Includes methods and events
Get block
Includes methods and events
Set block
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
attributes
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
behaviors
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
New keyword
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
Private keyword
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
Property procedure
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
ReadOnly keyword
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
WriteOnly keyword
Used in a Property procedure header to indicate that an application can set the property's value, but it cannot retrieve the value
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
Set block
Used to declare a variable that is not visible to applications that contain an instance of the class
attributes
Used to declare a variable that is not visible to applications that contain an instance of the class
behaviors
Used to declare a variable that is not visible to applications that contain an instance of the class
New keyword
Used to declare a variable that is not visible to applications that contain an instance of the class
Private keyword
Used to declare a variable that is not visible to applications that contain an instance of the class
Property procedure
Used to declare a variable that is not visible to applications that contain an instance of the class
ReadOnly keyword
Used to declare a variable that is not visible to applications that contain an instance of the class
WriteOnly keyword
Used to declare a variable that is not visible to applications that contain an instance of the class
Get block
Used to declare a variable that is not visible to applications that contain an instance of the class
Set block
Used to create an object
attributes
Used to create an object
behaviors
Used to create an object
New keyword
Used to create an object
Private keyword
Used to create an object
Property procedure
Used to create an object
ReadOnly keyword
Used to create an object
WriteOnly keyword
Used to create an object
Get block
Used to create an object
Set block
Allows an application to assign a value to the Private variable associated with a property
attributes
Allows an application to assign a value to the Private variable associated with a property
behaviors
Allows an application to assign a value to the Private variable associated with a property
New keyword
Allows an application to assign a value to the Private variable associated with a property
Private keyword
Allows an application to assign a value to the Private variable associated with a property
Property procedure
Allows an application to assign a value to the Private variable associated with a property
ReadOnly keyword
Allows an application to assign a value to the Private variable associated with a property
WriteOnly keyword
Allows an application to assign a value to the Private variable associated with a property
Get block
Allows an application to assign a value to the Private variable associated with a property
Set block
Allows an application to retrieve the contents of the Private variable associated with a property
attributes
Allows an application to retrieve the contents of the Private variable associated with a property
behaviors
Allows an application to retrieve the contents of the Private variable associated with a property
New keyword
Allows an application to retrieve the contents of the Private variable associated with a property
Private keyword
Allows an application to retrieve the contents of the Private variable associated with a property
Property procedure
Allows an application to retrieve the contents of the Private variable associated with a property
ReadOnly keyword
Allows an application to retrieve the contents of the Private variable associated with a property
WriteOnly keyword
Allows an application to retrieve the contents of the Private variable associated with a property
Get block
Allows an application to retrieve the contents of the Private variable associated with a property
Set block
Can be used to create a Public property
attributes
Can be used to create a Public property
behaviors
Can be used to create a Public property
New keyword
Can be used to create a Public property
Private keyword
Can be used to create a Public property
Property procedure
Can be used to create a Public property
ReadOnly keyword
Can be used to create a Public property
WriteOnly keyword
Can be used to create a Public property
Get block
Can be used to create a Public property
Set 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
attributes
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
behaviors
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
New keyword
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
Private keyword
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
Property procedure
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
ReadOnly keyword
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
WriteOnly keyword
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
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
Set block
Characteristics that describes the object
attributes
Characteristics that describes the object
behaviors
Characteristics that describes the object
New keyword
Characteristics that describes the object
Private keyword
Characteristics that describes the object
Property procedure
Characteristics that describes the object
ReadOnly keyword
Characteristics that describes the object
WriteOnly keyword
Characteristics that describes the object
Get block
Characteristics that describes the object
Set block
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
42
What is meant by overloaded methods and when is overloading of methods useful?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 42 flashcards in this deck.