In UML, what does a solid line with a diamond at one end represent in a class diagram?
23 views
- Composition (Correct Answer)
- Aggregation
- Inheritance
- Association
Explanation
Answer: a) Composition
Explanation: In UML, a solid line with a diamond at one end represents a composition relationship between two classes. Composition is a stronger form of aggregation, where the lifetime of the contained object is tied to the lifetime of the container object.