GVBVV10Ch12

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

C

A __________ defines a special type of class member that contains Get and Set sections. a. method b. constructor c. property procedure d. member variable

A

A __________ is automatically called when an instance of the class is created. a. Load method b. constructor c. instantiator d. Initializer method

A

A constructor is a method named __________ found inside the class. a. New b. Constructor c. Finalizer d. the same as the class name

B

A function that is a member of a class is called __________ . a. a module b. a method c. a component d. an element

A

A variable declared inside a class is also known as a __________. a. member variable b. static variable c. hidden variable d. global variable

A

A(n) ____________ is a class property that is defined by only a single line of code. a. auto-implemented property b. inline property c. base property d. derived property

B

When using the Remove method of a collection, what happens if the argument provided is a string expression? a. The item at the index value represented by that string is removed if found in the collection. b. The item with a key value that matches the string is removed, if the key was found in the collection. c. A string expression may not be provided as an argument. d. A syntax error occurs

C

Which method is used to create a new item in a collection? a. Store b. Insert c. Add d. Create

C

Which of the following describes the primary reason that one would override a property or method? a. the property or method in the base class was declared as Private and can't be used b. the property or method in the base class has an error c. the property or method in the base class is not appropriate for the derived class d. the property or method does not exist in the base class

D

Which of the following displays a message box saying "I have been created" every time a new instance of the class ShowMe is created? a. Public Class ShowMe MessageBox.Show("I have been created") End Class b. Public Class ShowMe Public Sub Constructor() MessageBox.Show("I have been created") End Sub End Class c. Public Class ShowMe Public Sub Create() MessageBox.Show("I have been created") End Sub End Class d. Public Class ShowMe Public Sub New() MessageBox.Show("I have been created") End Sub End Class

C

Which of the following displays a window that lets you browse the classes available to your project? a. Component Browser b. Class Browser c. Object Browser d. Module Browser

C

Which of the following is the correct way to declare a public read-only property? a. Public ReadOnly Property PropertyName() As DataType Statements End Property b. Public Property ReadOnly PropertyName() As DataType Get Statements End Get End Property c. Public ReadOnly Property PropertyName() As DataType Get Statements End Get End Property d. ReadOnly Public Property PropertyName() As DataType Set Statements End Set End Property

C

Which of the following operators determines if two object variables reference the same object? a. = b. IsEqual c. Is d. SameAs

B

Which of the following statements will remove an object referred to by the object variable NewStudent? a. NewStudent = String.Empty b. NewStudent = Nothing c. NewStudent.Delete d. Remove.NewStudent

C

Why is important to remove objects that are no longer need in your program? a. To prevent over writing new objects with old data b. To prevent program crashes c. To free up memory for other uses d. So the same variable can be assigned to a different object

C

You access public members of a class object with ___________. a. the getData method b. the access operator c. the dot operator d. a public module

D

You can __ a method or property procedure found in the base class by adding one with the same name to a derived class. a. Overrule b. Substitute c. Inherit d. Override

D

__________ is a general model of something - it captures the general characteristics of an object. a. A constructor b. A collection c. An instance d. An abstraction

A

What happens when an object variable goes out of scope? a. The object may be removed from memory by the garbage collector. b. The object may be referred to using the dot operator. c. An exception error will be generated. d. The object becomes accessible again when the variable comes back into scope.

A

When creating a ToString method to return a string representation of the data stored in an object, you must __________. a. override the ToString method, which is inherited from the built-in Object class b. add a Protected ToString method to the class c. do nothing as the ToString method automatically performs this for each class d. a ToString method is a reserved word that cannot be added to a class

A

All of the following statements are true about the .NET garbage collection utility except __________. a. The garbage collector is a utility program that removes objects from memory that are no longer needed. b. As the amount of available memory decreases, the garbage collector removes unreferenced objects more often. c. The garbage collector removes an object from memory immediately when the last reference to it has been removed. d. The system uses an algorithm to determine when it should periodically remove unused objects.

B

An instance of a class is also called ______________. a. a tangible entity b. an object c. a method d. a property

C

Class members declared with this access specifier are like private members, except they may be accessed by methods and property procedures in derived classes. a. Private b. Public c. Protected d. SubClass

A

Client programs can query __________ to get values, but they cannot modify them. a. Read-Only properties b. Get/Set properties c. Private methods d. Public properties

A

Every class you create in Visual Basic is automatically derived from this built-in class. a. Object b. Base c. Window d. Application

A

If there exists a class named Person and one wants to create a new class named Student based on the Person class, what code segment below shows the correct way to do so? a. Public Class Student Inherits Person b. Public Class Student Extends Person c. Public Class Student Inherits From Person d. Public Class Student :Person

D

It's possible to access the items in a collection using __________. a. an integer index of the item to be retrieved b. the Item method to retrieve an item with a specific key value c. a For Each loop d. all of the above

B

Object oriented analysis starts with __________. a. declaring the member variables b. finding the classes c. describing attributes and operations d. defining the property procedures

C

Object-oriented programming is a way of designing and coding applications such that interchangeable software can be used to build larger programs. a. controls b. structures c. components d. languages

A

The __________ access specifier permits class members to be accessed by statements both outside the class and outside the assembly. a. Public b. Protected c. Private d. Friends

C

The __________ access specifier permits class members to be accessed only by statements inside the class. a. Public b. Protected c. Private d. Friend

D

The __________ property is used to get the number of items in a collection. a. accumulator b. enumerator c. index d. count

D

The class is the portion of a class that is visible to the application programmer. a. form b. design c. control d. interface

A

The following statements are true about user-defined collections except __________. a. indexes for collections start at 0 b. collections can grow dynamically as items are inserted and removed c. collections hold a variety of different objects d. you can access the individual items in a collection using the Item property

B

The hiding of data and procedures inside a class is achieved through a process called ________. a. data enclosing b. encapsulation c. modularization d. components

C

This key word is used to refer to properties and methods found in the base class. a. Base b. Me.Base c. MyBase d. Base.Class


Set pelajaran terkait

35: EMT: Abdominal and Genitourinary Trauma: Homework

View Set

Key Issue 7.4: Why do Ethnic Cleansing & Genocide Occur?

View Set

BY280 - Lecture 32 - Women's Health Initiative (WHI)

View Set

Chapter 5: Cell Membrane and Signaling

View Set

Lecture Final BIO 213 ( Liberty University)

View Set

Astronomy: Facts on Neil Armstrong and The Eagle has Landed

View Set

Chapter 4: Marketing in International Markets and Globalisation

View Set

Chap. 17: Endocrine System ZOO251

View Set

FINA 3313 EXAM 3 FLR quiz review

View Set