Logo of Vovisoft


SHORT ANSWERS

1.    How do you instantiate an instance of a VB class?

  1. Using NEW keyword as: Dim objMyobject as New MyClass.class1

  2. Using CREATEOBJECT keyword as: Set objMyobject = CreateObject("MyClass.Class1")


2.    How would you run Excel from a VB app?

  1. Set reference to OLE Automation

  2. Set reference to ‘Microsoft Excel 8.0 Object Library’

  3. Define the variables as:

Dim objExcel as Excel.Application

Dim objWorkBook as Excel.WorkBook

Dim objWorkSheet as Excel.WorkSheet

Set objExcel = CreateObject("Excel.Application")

Set objWorkBook = objExcel.WorkBooks.Add

Set objWorkSheet = objExcel.WorkSheets.Add

ObjExcel.Visible = True


3.    Briefly explain how you would go about error handling in a VB app.

 1/ Set up the common module containing Public procedure to display all information for the error:

Err.Description

Err.Number

Err.Source

Module name and Procedure name that error existed within

  2/ Then raise the error:

  Err.Raise Err

4.    For what purpose would you use a .RES file? What are the benefits?

  1. Storing data in Resource file and access them individually as needed

  2. Benefit: Improve the loading time

  3. No need to recompile program

  4. Convenient for International versions with different resource strings for each country language.


5.    Explain the use of the Let and Get keywords in a VB class?

Let: Assign a value to a property (WRITING the property value)

Get: Retrieve the value of the property of the object (READING the property value)


6.    What are 2 types of ActiveX servers? Explain.

  1. In-process server DLL: an object that runs within the process space of the client that calls it

  2. Out-process server EXE: and object that run in its own process space


7.    What is the difference between a class and an object?

  1. Class: is used to define the interfaces of COM components

  2. Object: An instance of class that resides in memory


8.    What are the main numeric types available in VB? What are the advantages and disadvantages of each?

 1/ Integer, Long, Real, float

 

_____________________________________

GENERAL, NON-VB SPECIFIC QUESTIONS

Software Development Fundamentals

(for Senior Analyst/Programmers)

 

1.    Please provide a brief explanation of the following:

Abstraction 

Encapsulation

Encapsulation is the way that binds together code and the data it manipulates and keeps both safe from outside interference and misuse. 

Coupling: which is best, tight or loose coupling?

 

Polymorphism

  1. Concept: "One interface, multiple methods"

  2. The purpose of polymorphism as it is applied to OOP is to allow one name to be used

  3. To specify a general class of actions. Within a general class of actions, the specific action

  4. To apply will be determined by the type of data.