the composed object can be part of at most one composite, and "If a composite object is deleted, all of its part instances that are objects are deleted with it". Thus in UML, composition has a more narrow meaning than the usual object composition. The graphical notation represents: the property as a typed element in the box of the enclosing class, the association as a plain line between the associated classes, the aggregation as an unfilled diamond on the side of the aggregate and a solid line, the composition as a filled diamond on the side of the composite and a solid line. Aggregation Aggregation differs from ordinary composition in that it does not imply ownership. In composition, when the owning object is destroyed, so are the contained objects. In aggregation, this is not necessarily true. For example, a university owns various departments (e.g., chemistry), and each department has a number of professors. If the university closes, the departments will no longer exist, but the professors in those departments will continue to exist. Therefore, a university can be seen as a composition of departments, whereas departments have an aggregation of professors. In addition, a professor could work in more than one department, but a department could not be part of more than one university. Composition is usually implemented such that an object contains another object. For example, in C++: class Professor; // Defined elsewhere class Department { public: Department(const std::string& title): title_(title) {} private: // Aggregation: |Professors| may outlive the |Department|. std::vector<std::weak_ptr<Professor>> members_; const std::string title_; }; class University { public: University() = default; private: // Composition: |Department|s exist only as long as the faculty exists. std::vector<Department> faculty_ = { Department("chemistry"), Department("physics"), Department("arts"), }; }; In aggregation, the object may only contain a reference or pointer to the object (and not have lifetime responsibility for it). Sometimes aggregation is referred to as composition when the distinction between ordinary composition and aggregation is unimportant. The above code would transform into the following UML Class diagram: Aggregation in COM In Microsoft's Component Object Model, aggregation means that an object exports, as if it were their owner, one or several interfaces of another object it owns. Formally, this is more similar to composition or encapsulation than aggregation. However, instead of implementing the exported interfaces by calling the interfaces of the owned object, the interfaces of the owned object themselves are exported. The owned