OOPs VB .Net Quiz

OOPs VB .Net Quiz

13 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

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.
Question 2 Multiple Choice (Single Answer)

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.
Question 3 Multiple Choice (Single Answer)

The standard prefix to signify a class is:

  1. B
  2. C
  3. L
  4. S
  5. T
Question 4 Multiple Choice (Single Answer)

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

  1. Events
  2. Methods
  3. Properties
  4. Private variables
  5. Public variables
Question 5 Multiple Choice (Single Answer)

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.
Question 6 Multiple Choice (Single Answer)

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.
Question 7 Multiple Choice (Single Answer)

Polymorphism can apply to:

  1. math operators.
  2. method names.
  3. object names.
  4. Both a and b.
  5. All of the above.
Question 8 Multiple Choice (Single Answer)

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.
Question 9 Multiple Choice (Single Answer)

Which element of a class is optional?

  1. Constructs
  2. Fields
  3. Methods
  4. Properties
  5. All of the above.
Question 10 Multiple Choice (Single Answer)

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
Question 11 Multiple Choice (Single Answer)

A constructor is a special type of:

  1. class.
  2. field.
  3. method.
  4. property.
  5. variable.
Question 12 Multiple Choice (Single Answer)

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.
Question 13 Multiple Choice (Single Answer)

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( )