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.

Comments (0)

No comments yet. Be the first to comment!

Want to practice more?

Explore thousands of MCQs across every exam category on Exams Nepal.

Find More MCQs