6
Recognizing a Pattern
•In every case we wish to compose objects into tree structures to represent whole-part hierarchies. The interesting factor is that each part could be a whole.
–Menus contain items, each of which                                                could be a menu
–Graphs contain nodes, each of which                                              could be a graph
–Directories contain files, each of which                                          could be a directory
•It seems like we should be able to generalize and create a standard design for:
–Composites that contain components, each of which could be a composite.
•