|
1. How do you instantiate an instance of a VB
class?
-
Using NEW keyword as: Dim objMyobject
as New MyClass.class1
-
Using CREATEOBJECT keyword as: Set
objMyobject = CreateObject("MyClass.Class1")
2. How would you run Excel from a VB app?
-
Set reference to OLE Automation
-
Set reference to ‘Microsoft Excel
8.0 Object Library’
-
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?
-
Storing data in Resource file and
access them individually as needed
-
Benefit: Improve the loading time
-
No need to recompile program
-
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.
-
In-process server DLL: an object that
runs within the process space of the client that calls it
-
Out-process server EXE: and object
that run in its own process space
7. What is the difference between a class
and an object?
-
Class: is used to define the
interfaces of COM components
-
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
-
Concept: "One interface, multiple
methods"
-
The purpose of polymorphism as it is
applied to OOP is to allow one name to be used
-
To specify a general class of actions.
Within a general class of actions, the specific action
-
To apply will be determined by the
type of data.
|