Skip to main content

Posts

Showing posts with the label tree

VBA versus .NET

Composite Pattern

A implementation of the composite pattern similar to a class that would be used for constructing a binary search tree.  Better, more detailed implementations are known as red-black or AVL trees. Salient Characteristic(s) Reduces complexity by treating objects consistently, as opposed to having different methods and properties for each collection Any modification method of a collection would nbe the same as modifying the container Code namespace DesignPatterns {     /// <summary>     /// An example of composite that might be used in a binary tree     /// In this case, the tree node is composed of tree nodes     /// Any modification method of a node, would be the same as modifying the node itself     /// </summary>     public class TreeNode      {         private int _Value;         public int Value         {   ...