0
Alien head

OOPs VB .Net Quiz

Description: OOPs VB .Net Quiz
Number of Questions: 13
Created by:
Tags: .net vb oop

Inheritance makes it easier to:

  1. reuse and modify existing modules of code.

  2. write and read code by sharing method names.

  3. hide and protect data from external code.

  4. Both a and b.

  5. All of the above.

Answer: 1

Polymorphism makes it easier to:

  1. reuse and modify existing modules of code.

  2. write and read code by sharing method names.

  3. hide and protect data from external code.

  4. Both a and b.

  5. All of the above.

Answer: 2

The standard prefix to signify a class is:

  1. B

  2. C

  3. L

  4. S

  5. T

Answer: 5

When using encapsulation how should data be shared with external code?

  1. Events

  2. Methods

  3. Properties

  4. Private variables

  5. Public variables

Answer: 3

Which statement is true?

  1. A base class inherits some of the properties of a derived class.

  2. A base class inherits all of the properties of a derived class.

  3. A derived class inherits some of the properties of a base class.

  4. A derived class inherits all of the properties of a base class.

  5. None of the above.

Answer: 4

When a base class is changed:

  1. there is no effect on the derived class.

  2. the derived class changes when the key word Overridden is used.

  3. only the methods of the derived class change.

  4. only the properties of the derived class change.

  5. the derived class automatically changes.

Answer: 5

Polymorphism can apply to:

  1. math operators.

  2. method names.

  3. object names.

  4. Both a and b.

  5. All of the above.

Answer: 4

With polymorphism:

  1. one method can have multiple names.

  2. one object can have multiple names.

  3. many methods can share the same name.

  4. many objects can share the same name.

  5. None of the above statements are true.

Answer: 3

Which element of a class is optional?

  1. Constructs

  2. Fields

  3. Methods

  4. Properties

  5. All of the above.

Answer: 5

What is the suggested order for the definition of class elements from first to last?

  1. Constructs, fields, methods, properties

  2. Properties, constructs, fields, methods

  3. Fields, properties, constructs, methods

  4. Constructs, properties, fields, methods

  5. Methods, constructs, properties, fields

Answer: 3

A constructor is a special type of:

  1. class.

  2. field.

  3. method.

  4. property.

  5. variable.

Answer: 3

Which is true for constructors in a class?

  1. All constructors must have the same number of parameters.

  2. All constructors must be the same parameter data type.

  3. Some constructors can have the same list of parameters.

  4. Only two constructors in a class can have the same list of parameters.

  5. No two constructors in a class can have the same list of parameters.

Answer: 5

Which statement will call a constructor of a base class?

  1. Base.New( )

  2. BaseConstructor.New ( )

  3. CallBase.New( )

  4. Constructor.New ( )

  5. MyBase.New( )

Answer: 5
+ View questions