Section 11.1 Classes and Objects
1.
Which line of code will declare and create an instance of a new object variable called instructor using a class called Faculty?
(A) Dim
(B) Dim
(C) Dim
(D) Dim
D
2.
Faculty As instructor Faculty As instructor instructor
As Faculty
New instructor()
As New Faculty()
What is the purpose of the Get property procedure?
(A) retrieve the value of a property
(B) assign values
(C) access private methods
(D) verify the data
A
3.
Which procedure will set default values for member variables when an object is instantiated? (A) Form1_Load
(B) Get property procedure
(C) New
(D) Set property procedure
C
4.
Which one of the following statements does NOT apply to object-oriented programming? (A) Object-oriented programming helps to prevent the complete rewriting of a program every time a minor change needs to be made.
(B) Object-oriented programming makes use of the principle of “data hiding.”
(C) Object-oriented programming makes use of the encapsulation within an object of data and procedures that act on the data.
(D) Object-oriented programming depends on the programmer having access to and understanding all of the code that contains the data and procedures that are encapsulated within an object.
D
5.
Which of the following is an example of a control object?
(A)
(B)
(C)
(D)
6.
Control objects and code objects share many things in common. Which of the following statements applies only to control objects (in other words, which of the following statements does not apply to code objects)?
(A)
(B)
(C)
(D)
7.
they are created from the Toolbox they are predefined and have physical manifestations they require the writing of a class block of code they include objects of the type TextBox and ListBox
C
Which one of the following statements does NOT accurately describe object-oriented programs? (A)
(B)
(C)
(D)
9.
these objects have properties these objects are predefined and have physical