Академический Документы
Профессиональный Документы
Культура Документы
• What is UML ?
• UML is a language for Documenting
• Building Blocks of the UML
What Is UML
• Things
• Relationships
• Diagrams
Things in the UML
Things in the real world are represented as objects, in the same way that things in
the constructed world are.
• Structural things
• Behavioral things
• Grouping things
• Annotation things
Structural things
Structural things are the nouns of UML models. These are mostly static
parts of a model, representing elements that are either conceptual or
physical. In all , there are 7 kinds of structural things.
• Classes
• Interfaces
• Collaborations
• Use Cases
• Active Classes
• Components
• Nodes
Behavioral Things
Behavioral things are the dynamic parts of UML models.
These are the verbs of an model, representing behavior
over time and space. In all there are two primary kinds of
behavioral things.
• Interaction
• State machine
Grouping Things
Grouping things are the organizational parts of UML
models. These are the boxes into which a model can be
decomposed. In all there is one primary kind of grouping
thing, namely, Packages
Annotational Things
Annotational things are the explanatory parts of UML
models. These are the comments you may apply to
describe.
Inheritance
Bidirectional
Associations
1. Association can have name and you can use that name to describe the nature of
relationship
2. When a class participates in an association, it has a specific role which it can play
in the relationship.
3. You can show roles in diagram.
Multiplicity
(source) (target)
Aggregation
1. Type of Association
2. Represents a whole part relationship. It’s a “has-a ” relationship.
3. Relationship is represented by a hollow diamond and continous line
4. Diamond is towards whole part
5. A has B as a part of it.
6. A exists even if B is deleted
7. Loose bonding
8. For example : Assembly – Parts : Aircraft - Engine
Composition
1. Type of association
2. Represents a whole part relationship.It’s a “has-a” relationship.
3. Relationship is represented by shaded diamond and a continuous line
4. Diamond is towards whole part
5. A consists of B.
6. A gets deleted when B is deleted. It’s a on-delete cascade
7. Tight bonding.
8. For example : Library : Books -- Whole : Parts
Overriding
In UML
+ Public
- Private
# Protected
Rose Facility
Textual
content
Action
OOA
Object Oriented Analysis
OOD
Implementation View
1. This has Component diagram.
Environment View
Behavioral View
1. Sequence Diagram
2. Collaboration Diagram
3. State Chart Diagram.
4. Activity Diagram.
5. All of the above represent Dynamic behavior.
Use Case Analysis
1. Relationship shown is extend between Buy Merchandise and Browse use case.
2. EXTENDS implies optional relationship.
3. Any of the following situation will occur.
3.a User will login and browse the online shopping site and leave.
3.b User will login , browse and Buy Merchandise.
4. So we can interpret this as Buy only after browsing .
5. Browse but don’t buy.
6. Use this when you think its ADD-ON to existing functionality.
Use Case Relationships
1. They show a set of objects and messages sent and received by those
objects.
2. The objects are named or anonymous instances of classes.
3. Distinguishing features of these diagrams are object lifeline and focus of
control.
4. Object lifeline : It shows existence of a object over a period of time. It’s a
vertical dashed line.
5. Focus of Control : It’s a tall , thin , rectangle that shows period of time
during which object is performing an action , either directly or through
subordinate procedure. The top of rectangle is aligned with start of
procedure and bottom with completion.
6. You can show recursion , self operation .
7. This diagram is with respect to time.
8. Models dynamic aspect of systems.
Collaboration Diagrams Interaction Diagrams