Skip to Content
Visual Basic Design Patterns: VB 6.0 and VB.NET
book

Visual Basic Design Patterns: VB 6.0 and VB.NET

by James W. Cooper
November 2001
Intermediate to advanced
512 pages
9h 10m
English
Addison-Wesley Professional
Content preview from Visual Basic Design Patterns: VB 6.0 and VB.NET

Chapter 17. The Composite Pattern

Frequently programmers develop systems in which a component may be either an individual object or a collection of objects. The Composite pattern is designed to accommodate both cases. You can use the Composite to build part-whole hierarchies or to construct data representations of trees. In summary, a composite is a collection of objects, any one of which may be either a composite or just a primitive object. In tree nomenclature, some objects may be nodes with additional branches and some may be leaves.

The problem that develops is the dichotomy between having a single, simple interface to access all the objects in a composite and the ability to distinguish between nodes and leaves. Nodes have children and can ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Visual Basic 2008

Programming Visual Basic 2008

Tim Patrick
Visual Basic 2015 Unleashed

Visual Basic 2015 Unleashed

Alessandro Del Sole

Publisher Resources

ISBN: 0201702657Purchase book