educative.io

Where is the explanation for these instances and multiple associations? I didn't find in any of the uml chapters in object oriented design

I am specifically talking about the asterisk and number 2 in the class diagram of this quiz question. There is no explanation for it in the Class Diagram chapter.


Course: Grokking the Low Level Design Interview Using OOD Principles - Learn Interactively
Lesson: Quiz: Object-oriented Design - Grokking the Low Level Design Interview Using OOD Principles


Course: Grokking the Low Level Design Interview Using OOD Principles - Learn Interactively
Lesson: Quiz: Object-oriented Design - Grokking the Low Level Design Interview Using OOD Principles

1 Like

Hi @Navpreet_Singh !!
Asterisk (*) in Class Diagrams:

In class diagrams, an asterisk (*) usually indicates multiplicity, which represents the number of instances that are associated with another class in a specific relationship. The asterisk is used to denote a general multiplicity, and it’s often accompanied by a line connecting to another class to represent the association.

  • Asterisk Alone (*): If you see an asterisk (*) by itself connected to a line, it generally implies that there’s an association between classes, and the multiplicity is not specified. It could mean that the association can involve any number of instances on both ends of the relationship.
    B) "One object of B must be associated with exactly two objects of D."

Since the asterisk (*) and simple line connected to 2 instances of Block D indicate a multiplicity relationship between Block A and Block D, and considering that Blocks B and C extend Block A, option B becomes relevant and true in the context of the class diagram.

The relationship between Block B, Block D, and Block A suggests that instances of Block B must be associated with exactly two instances of Block D through the intermediary Block A.
I hope it helps. Happy learning :blush: