volume_mute

Class Diagram for Email — Associations and Multiplicities

publish date2026/06/08 22:17:20.600204 UTC

volume_mute

In a class diagram for an email system, what is the correct multiplicity for the association between Mailbox and EmailMessage?

Correct Answer

1 to 0..* — a mailbox may contain zero or more messages, and each message belongs to exactly one mailbox

Explanation

The most appropriate multiplicity is 1 to 0..*: each message belongs to exactly one mailbox (or folder), and a mailbox may contain zero or more messages (it could be empty). The 1..* option would incorrectly force every mailbox to always have at least one message. A many-to-many (*:*) would allow a message to exist in multiple mailboxes simultaneously, which is not typical in a standard email model.

Reference

Software Engineering, Ian Sommerville, 9th edition


Quizzes you can take where this question appears