In computer science, object composition (not to be confused with function composition)'s a way to combine simple objects or data types into more complex ones. Compositions are a critical building block of many basic data structures, including the tagged union, the linked list, and the binary tree, as well as the object used in object-oriented programming. Composited (composed) objects are often referred to as having a "has a" relationship. A real-world example of composition may be seen in an au… (
More on Struct)