beginners tutorial - Learn VB6
VB6 tutorial - Learn Advanced VB6
Analysis - System analysis and Design tutorial for Software Engineering
You are here: Visual
Basic > Advanced VB6 tutorial
> Chapter 12
Implementing an Object Model With a COM Component
To implement an object model in a COM component, you typically would use one
or more classes of objects.
Define the major real-world objects that the component needs to model. These major
objects will become the classes of the COM component.
Define the attributes and behaviors of these real-world objects. The attributes
will become properties of the classes and the behaviors will become methods or events.
Identify any repeating groups of objects from among the attributes of the class—that
is, groups of subobjects that can belong to the class and whose number might vary.
An employee can have one or more previous jobs, for example, so PrevJobs could be
an attribute of an Employee class. Such repeating groups of objects can be implemented
in Collection objects, which in turn contain zero or more individual members known as
An Employee class in a Human Resources COM component might have properties
such as HireDate, Salary, and VacationTimeAccrued; methods such as Promote, TakeVacationTime,
Hire, and Fire; and events such as VacationAccrualChange.
<< Previous | Contents
| Next >>