Object Relationships

At this point, we've gone through our use case scenarios, and we've defined all the objects that we need to model our business process. We've even gone so far as to determine how all the objects are related to each other at a high level.

Thus far, however, our objects don't have any properties or methods that actually let them interact with each other. Essentially, we've identified relationships between objects; but we haven't added any way to implement those relationships.

Earlier in the chapter, we discussed the common types of object relationships:

Relationship Description/Example
Ownership (owns, has) Parent-child relationships
User (uses) One object uses or employs the services of another object
Aggregate (contains, made of) One object is made up of other (subordinate) objects
Generalization (is a) One object is a specific type of another object

Let's go through each relationship and discuss how to implement that relationship with Visual Basic.

© 1997 by Wrox Press. All rights reserved.