Deck 11: Multiple Classes and Inheritance
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/112
Play
Full screen (f)
Deck 11: Multiple Classes and Inheritance
1
The code in a constructor procedure executes after any other code in the object._________________________
False,before
2
To use a three-tier structure for a program,you must divide the processing into ____.
A) baselines
B) indices
C) classes
D) references
A) baselines
B) indices
C) classes
D) references
C
3
____ is a major contributor to reliable and robust programs.
A) Resolution
B) Concatenation
C) Encapsulation
D) Identification
A) Resolution
B) Concatenation
C) Encapsulation
D) Identification
C
4
In a three-tier architecture,the business tier contains the ____ that must occur to fulfill the requirements of the program.
A) logic
B) objects
C) syntax
D) calculations
A) logic
B) objects
C) syntax
D) calculations
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
5
The SelectedIndex property of a ComboBox object will contain the value ____ if a selection has been made.
A) -1
B) 0
C) of the entry
D) True
A) -1
B) 0
C) of the entry
D) True
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
6
The WriteLine procedure will ____.
A) write a record to a file
B) place a line return in the file
C) update an existing record in a file
D) close a StreamWriter
A) write a record to a file
B) place a line return in the file
C) update an existing record in a file
D) close a StreamWriter
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
7
The ____ property should be tested to ensure that a masked textbox contains characters for the entire mask area.
A) MaskRange
B) MaskFull
C) MaskComplete
D) CompleteMask
A) MaskRange
B) MaskFull
C) MaskComplete
D) CompleteMask
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
8
In a three-tier architecture,only the presentation tier will actually read and write data._________________________
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
9
Concatenation is a major contributor to reliable and robust programs._________________________
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
10
Inheritance allows one class to gain ____ from another class.
A) attributes
B) records
C) procedures
D) bases
A) attributes
B) records
C) procedures
D) bases
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
11
Use the ____ function to test an input value to ensure that it is numeric.
A) IsNumber
B) IsNumeric
C) TestNumber
D) TestNumeric
A) IsNumber
B) IsNumeric
C) TestNumber
D) TestNumeric
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
12
In a three-tier architecture,only the persistence classes will actually ____ data.
A) record
B) read
C) index
D) write
A) record
B) read
C) index
D) write
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
13
The TabIndex property determines which object on a form receives the focus when the user presses the ____ key.
A) ALT
B) SPACEBAR
C) TAB
D) BACKSPACE
A) ALT
B) SPACEBAR
C) TAB
D) BACKSPACE
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
14
A subclass is always in a "has-a" relationship with the base class._________________________
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
15
The MaskFull property will return a value of ____ if the mask area of a masked textbox is not completely filled.
A) True
B) False
C) 0
D) -1
A) True
B) False
C) 0
D) -1
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
16
To specify the sequence of objects (like those in the accompanying figure)that will be selected when the TAB key is pressed,the ____ property is used. 
A) TabIndex
B) TabOrder
C) SelectedIndex
D) SelectedItem

A) TabIndex
B) TabOrder
C) SelectedIndex
D) SelectedItem
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
17
In a ComboBox object,the SelectedIndex property will contain a value of ____ if no selection has been made.
A) -1
B) 0
C) 1
D) null
A) -1
B) 0
C) 1
D) null
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
18
In a three-tier architecture,the ____ tier contains the classes that display information and accept user input.
A) validation
B) presentation
C) business
D) persistence
A) validation
B) presentation
C) business
D) persistence
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
19
Data access tier is another name for the presentation tier._________________________
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
20
The ____ tier is a tier within the three-tier structure into which programs are divided.
A) Presentation
B) Records
C) Business
D) Persistence
A) Presentation
B) Records
C) Business
D) Persistence
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
21
In a three-tier architecture for Web applications,the ____ tier contains the Web page that appears to the user.
A) business
B) interface
C) persistence
D) presentation
A) business
B) interface
C) persistence
D) presentation
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
22
Data that is ____ remains after the program is terminated.
A) extant
B) legacy
C) lingering
D) persistent
A) extant
B) legacy
C) lingering
D) persistent
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
23
The ____ tier implements the "business rules" required for the application.
A) business
B) data access
C) data processing
D) rules
A) business
B) data access
C) data processing
D) rules
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
24
The processing in the ____ tier ensures that valid data is entered into the program for processing in the business tier.
A) validation
B) presentation
C) business
D) persistence
A) validation
B) presentation
C) business
D) persistence
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
25
Whenever inheritance is used,the subclass must fit into a(n)____ relationship with the base class.
A) equivalence
B) "has-a"
C) helper
D) "is-a"
A) equivalence
B) "has-a"
C) helper
D) "is-a"
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
26
A subclass inherits attributes from a(n)____ class.
A) inheriting
B) disseminating
C) distributing
D) base
A) inheriting
B) disseminating
C) distributing
D) base
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
27
In a three-tier architecture,the ____ tier contains the logic and calculations.
A) business
B) persistence
C) presentation
D) validation
A) business
B) persistence
C) presentation
D) validation
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
28
The ____ prepares an object for use in the program.
A) constructor
B) class variable
C) class declaration
D) destructor
A) constructor
B) class variable
C) class declaration
D) destructor
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
29
____ is the concept of separating processing and hiding data within specific classes.
A) Encapsulation
B) Inheritance
C) Object-oriented programming
D) Persistence
A) Encapsulation
B) Inheritance
C) Object-oriented programming
D) Persistence
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
30
Data that is stored in a file or database on disk often is called ____ data.
A) persistent
B) extant
C) resistant
D) existing
A) persistent
B) extant
C) resistant
D) existing
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
31
The ____ keyword is used to declare a variable that will contain the address of an object created from a class.
A) Dec
B) Const
C) Dim
D) Set
A) Dec
B) Const
C) Dim
D) Set
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
32
Which of the following contains the correct code to create and instantiate an object named MyStudent from a class named Student?
A) Dim objStudent As Student
B) Dim objStudent As New Student
C) Dim objStudent = Student
D) Dim objStudent = New Student
A) Dim objStudent As Student
B) Dim objStudent As New Student
C) Dim objStudent = Student
D) Dim objStudent = New Student
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
33
When designing a program using the three-tier approach,a primary rule is that classes in the presentation tier can communicate only with classes in the ____ tier.
A) business
B) data access
C) persistence
D) validation
A) business
B) data access
C) persistence
D) validation
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
34
If the developer writes no code for a class ____,Visual Basic automatically generates any processing that must be accomplished to prepare the object for use.
A) builder
B) constructor
C) creator
D) instantiator
A) builder
B) constructor
C) creator
D) instantiator
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
35
The code in a(n)____ procedure executes before any other code in an object.
A) beginner
B) builder
C) constructor
D) instantiation
A) beginner
B) builder
C) constructor
D) instantiation
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
36
When an object requires data when it is instantiated,the data can be passed as part of the ____ code.
A) encapsulation
B) inheritance
C) instantiation
D) declaration
A) encapsulation
B) inheritance
C) instantiation
D) declaration
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
37
When a class is ____ into an object using the New keyword,a special procedure called a constructor is executed in the class.
A) encapsulated
B) inherited
C) instantiated
D) constructed
A) encapsulated
B) inherited
C) instantiated
D) constructed
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
38
The ____ tier is also called the data access tier in a three-tier architecture.
A) presentation
B) business
C) persistence
D) data processing
A) presentation
B) business
C) persistence
D) data processing
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
39
The ____ statement can be used to instantiate an object from a class.
A) Create
B) CreateObject
C) Instantiate
D) New
A) Create
B) CreateObject
C) Instantiate
D) New
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
40
In a three-tier architecture,the classes in the ____ tier generally use data entered by users and data obtained from storage.
A) processing
B) persistence
C) presentation
D) business
A) processing
B) persistence
C) presentation
D) business
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
41
Validation of user input data should occur in the business tier of a three-tier architecture.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
42
The presentation tier of the three-tier structure consists of one or more forms and the objects placed on the forms.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
43
In a three-tier architecture,the business classes should not be concerned with the functionality of the user interface.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
44
A new class can be added to an application by pressing and holding,or right-clicking,the project name in the Solution Explorer window.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
45
In a three-tier architecture,user interface classes should not be concerned with how the data is manipulated by the business classes.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
46
To ensure that variables declared in a base class may be accessed by its subclasses but not by other classes,the variables should be declared with ____ access.
A) Private
B) Protected
C) Public
D) Restricted
A) Private
B) Protected
C) Public
D) Restricted
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
47
A ____ text file can be read into programs such as Microsoft Excel and Microsoft Access to import the data into the application.
A) comma-delimited
B) case
C) streamed
D) delimiter written
A) comma-delimited
B) case
C) streamed
D) delimiter written
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
48
The business tier of a three-tier architecture contains the code required to read and write data from permanent storage.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
49
Which tier is involved in saving data stored on a USB drive?
A) persistence
B) business
C) override
D) constructed
A) persistence
B) business
C) override
D) constructed
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
50
____ the text means writing the next record in the file following the last record currently in the file.
A) Integrating
B) Coding
C) Executing
D) Appending
A) Integrating
B) Coding
C) Executing
D) Appending
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
51
In a three-tier architecture for a Web application,the Web form and Web page constitute the persistence tier.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
52
A constructor procedure is identified by the keyword ____.
A) Con
B) Create
C) Constr
D) New
A) Con
B) Create
C) Constr
D) New
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
53
A procedure in a subclass that has the same name as a procedure in its base class must be declared in the subclass with the ____ keyword.
A) Overridable
B) Overrides
C) Replaceable
D) Replaces
A) Overridable
B) Overrides
C) Replaceable
D) Replaces
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
54
Both a base class and its subclass must have ____.
A) constructors
B) objects
C) libraries
D) glossaries
A) constructors
B) objects
C) libraries
D) glossaries
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
55
In a three-tier architecture,the user interface classes should have nothing to do with how data is validated.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
56
When using inheritance,the class that provides attributes to be inherited is called the ____ class.
A) inheriting
B) base
C) distributing
D) disseminating
A) inheriting
B) base
C) distributing
D) disseminating
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
57
A class that inherits attributes from another class is called a(n)____.
A) ascendant
B) base class
C) inheritor
D) subclass
A) ascendant
B) base class
C) inheritor
D) subclass
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
58
An object acts as a template for a class.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
59
A class can only be used in one program for one purpose.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
60
A comma separates each field in a record in a comma-____ file.
A) persistent
B) tiered
C) delimited
D) based
A) persistent
B) tiered
C) delimited
D) based
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
61
The Visual Basic statement "Dim objStudent As Student"will create and instantiate an object.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
62
Statements outside a base class and its subclasses can reference variables declared in the base class with Protected access.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
63
The ____________________ tier consists of one or more forms like the one in the accompanying figure. 

Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
64
Data cannot be passed into an object when it is being instantiated.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
65
To determine if a selection was made in a combo box,the value of the ____________________ property should be tested.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
66
The ____________________ property identifies if all digits have been entered into the mask.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
67
The TabIndex property of objects on a Windows form controls the order that objects will be selected when the user presses the ____________________ key.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
68
To call a procedure in another object,a statement in the calling object must identify both the object and the procedure within the object.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
69
The ____________________ property is used to specify the sequence of objects on a Windows form that will be selected when the Tab key is pressed.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
70
Generally,when using multiple classes within a program,variables in a class should not be available to code within other classes within the program.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
71
You must instantiate an object based on a class in order for the processing in the object to take place.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
72
When using inheritance,a subclass can use variables within its base class.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
73
If the developer writes no code for a class constructor,Visual Basic automatically generates whatever processing must be accomplished to prepare the object for use.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
74
When a subclass is instantiated,only the subclass's constructor is executed.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
75
When arguments are passed ByVal,it means the original value is passed to the instantiated object and a copy of the value is not used.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
76
A constructor procedure cannot contain arguments.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
77
A procedure in one class cannot call a procedure in another class within the program.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
78
An outside class cannot call an overridable procedure in the subclass.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
79
When using inheritance,a subclass cannot use the procedures within the base class.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
80
The subclass can use attributes from the base class as if those attributes were defined in the subclass.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck