UML Lecture - ClassDiagram (BITP - Topic3 - 2)
UML Lecture - ClassDiagram (BITP - Topic3 - 2)
Class Diagram
Classification of UML 2.5 Diagrams
Regular Loyalty
Customer Customer
Subtype1 Subtype2
Multiplicity
Symbol Meaning
1 One and only one
0..1 Zero or one
M..N From M to N (natural
language)
* From zero to any positive
integer
0..* From zero to any positive
integer
1..* From one to any positive
integer
OO Relationships: Composition
Association
Class W
Whole Class Models the part–whole relationship
Composition
Class P1 Class P2
Also models the part–whole relationship but,
in addition, Every part may belong to only
one whole, and If the whole is deleted, so
Part Classes are the parts
[From Dr.David A. Workman]
Example
Example:
A number of different chess boards: Each
square belongs to only one board. If a chess
board is thrown away, all 64 squares on that
board go as well.
AGGREGATION Aggregation:
Expresses a relationship among instances of related
Class E1 Class E2 classes. It is a specific kind of Container-
Containee relationship.
Containee Classes
Express a more informal relationship than
Example
Bag composition expresses.
Aggregations
may form "part of" the association, but may not be essential to it. They may also
exist independent of the aggregate. e.g. Apples may exist independent of the
bag.
Implementing Class Diagram using
starUML
Implementing Class Diagram using
starUML
Thank you
References
• https://www.uml-diagrams.org/uml-25-diagrams.html
• http://agilemodeling.com/essays/useCaseReuse.htm
• https://www.uml-diagrams.org/use-case-diagrams-examples.html
• Analysis Design and Analysis, Implementation, Topic 3: Object-Oriented
Modelling, NCC Education