Chapter 26 Using OOP terminology, the Public members are

subject Type Homework Help
subject Pages 3
subject Words 602
subject Authors Diane Zak

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Chapter 26: I Love This Class (Creating a Class)
TRUE/FALSE
1. The text boxes, labels, and buttons included in most Windows applications are objects.
2. A class itself is not an object; only an instance of a class is an object.
3. In addition to using Visual Basic classes, you also can define your own classes.
4. When you define a class using the Class statement, you are required to use Pascal case for class names.
5. Pascal case means you capitalize the first letter in the name and the first letter in any subsequent words
in the name.
6. When naming the Private variables in a class, many programmers use the underscore as the first
character and then use camel case for the remainder of the name.
7. When an application instantiates an object, only the Public members of the object’s class are made
available to the application.
8. The Get block in a Property procedure contains the Set statement, which begins with the keyword Set
and ends with the keywords End Set.
9. You can enter one or more instructions between the Set and End Set clauses.
10. A class can have more than one default constructor.
11. A class can contain methods other than constructors.
page-pf2
12. Constructors can be either Sub or Function procedures.
13. After defining a class, you can use it to instantiate a maximum of one object.
14. The real advantage of object-oriented programming is the ability to reuse a classfor example, use it
in a different way or in a different application.
MULTIPLE CHOICE
1. Every object used in an object-oriented program is created from a ____, which is a pattern that the
computer uses to create the object.
a.
class
c.
structure
b.
basic type
d.
template
2. Every object has ____, which are the characteristics that describe the object.
a.
properties
c.
parts
b.
attributes
d.
elements
3. ____ are the operations (actions) that the object is capable of performing.
a.
Instances
c.
Events
b.
Behaviors
d.
Methods
4. ____ are the actions to which an object can respond.
a.
Actions
c.
Events
b.
Behaviors
d.
Instances
5. A class containsor, in OOP terms, it ____all of the attributes and behaviors of the object it
instantiates.
a.
encapsulates
c.
collapses
b.
exposes
d.
implements
6. You define a class using the ____ statement.
a.
Object
c.
Type as Class
b.
ClassType
d.
Class
7. Using OOP terminology, the Public members are “exposed” to the application, whereas the ____
members are “hidden” from the application.
page-pf3
a.
Private
c.
Global
b.
Public
d.
Class level
8. An application must use a ____ property to either assign data to or retrieve data from a Private variable
in a class.
a.
Private
c.
Default
b.
Public
d.
Event
9. You create a Public property using a(n) ____ procedure.
a.
Attribute
c.
Set
b.
Property
d.
Get
10. The code contained in the ____ block of a Property procedure allows an application to retrieve the
contents of the Private variable associated with the property.
a.
Get
c.
Set
b.
SetProperty
d.
GetProperty
11. The code in the ____ block of a Property procedure allows an application to assign a value to the
Private variable associated with the property.
a.
Get
c.
Set
b.
SetProperty
d.
GetProperty
12. A(n) ____ is a class method, a Sub procedure named New, that contains the instructions for initializing
the class’s Private variables.
a.
default constructor
c.
default creator
b.
maker
d.
instantiate
13. A class can have only one default ____.
a.
maker
c.
instantiate
b.
creator
d.
constructor
14. The first word in a method name should be a(n) ____.
a.
noun
c.
adjective
b.
verb
d.
adverb

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.