Computing Science Exam Worksheet With Answers - Simon Fraser University Page 25

ADVERTISEMENT

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.
176) Which line of code will declare and create an instance of a new object variable called instructor
176)
using a class called Faculty?
A) Dim instructor As New Faculty()
B) Dim Faculty As instructor
C) Dim Faculty As New instructor()
D) Dim instructor As Faculty
Answer: A
177) What is the purpose of the Get property procedure?
177)
A) Access private methods.
B) Retrieve the value of a property.
C) Verify the data.
D) Assign values.
Answer: B
178) Which procedure will set default values for member variables when an object is instantiated?
178)
A) Get property procedure
B) Set property procedure
C) New
D) Form1_Load
Answer: C
179) Which one of the following statements does NOT apply to object-oriented programming?
179)
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 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) Object-oriented programming makes use of the encapsulation within an object of data and
procedures that act on the data.
Answer: C
180) Which of the following is an example of a control object?
180)
A) array
B) list box
C) string variable
D) primary key
Answer: B
181) Which of the following statements applies to code objects?
181)
A) They are created from the Toolbox.
B) They include objects of the type TextBox and ListBox.
C) They require the writing of a class block of code.
D) They are predefined and have physical manifestations.
Answer: C
182) Which of the following is an accurate definition of the term object-oriented program?
182)
A) An object-oriented program is a specific instance of a user-defined type.
B) An object-oriented program is a template from which objects are created.
C) An object-oriented program is populated with objects that hold data, have properties,
respond to methods, and raise events.
D) An object-oriented program is an encapsulation of data and procedures that has properties
and responds to methods.
Answer: C
25

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education