Email system class diagram5/25/2023 can an Email exist without a Sender or a Receiver? I often start to write an email and add the receivers later on (to avoid sending it by accident).who send() the Email: is it the Sender or is it the Email or is it the mailbox? It's not clear in your model where this responsibility lies.The question is how you want to see all these elements, i.e. Not to speak of the case were you would have Sender and Receivers beign composed with or inheriting from a common denominator EmailAccount.A ternary association as you have modelled it,.A Sender and a Receiver class, with Email being an association class.Email class with a composition with Reveiver and Sender if you'd see each sender or receiver as an embedded value object within the emails (so two emails with the same sender address would each have its own copy of the object).Email class with an aggregation with Reveiver and Sender if you see those as a part of an Email which can be shared (between several emails referring to the same senders or receivers).Email class with associations with Receiver and Sender.There are plenty of ways to model the relationship between an email, a sender, and multiple receivers. But think of it twice, because many people have difficulties reading ternary associations with hight multiplicity on one branch only. ![]() Yes, a ternary association is a possibility.
0 Comments
Leave a Reply. |