2. Why do we model?
Model is a simplification of reality.
Provides blueprint of sys.
May be structural or behavioural.
Modeling-For better understanding of sys.that are
developing
Achieve 4 aims:
1. Helps to visualize sys.
2. Permits to specify struc or behav of sys.
3. Provide templates to guide in constructn sys.
4. Document decisions made.
3. Applications of UML
Enterprise infmn sys.
Banking and financial services.
Telecommunications
Transportation
Defense/aerospace
Medical electronics
Scientific
Distributed Web-based services
4. Building blocks of UML
Things
II. Relationships
III. Diagrams
Things in the UML:
Four kinds:
1. Structural things
2. Behavioral things
3. Grouping things
4. Annotational things
I.
6. Structural things..
Construct
Description
class
a description of a set of objects that
share the same attributes,
operations, methods, relationships
and semantics.
Collection of operation that specify
service of a class or
component.Complete behavr.of
class/compnt.describes externally
visible behavr of an element.
Defines interactn and is a society of
roles and other elements that work
together to provide some cooperative
behavr that’s bigger than sum of all
elements.
Have structural and behavioral
dimensns
interface
collaboration
Syntax
ispelling
7. Structural things..
Construct
Description
use case
Description of set of sequence of
action that a sys performs.
Used to structure the behavioral things
in a model
A class whose objts own one or more
processes and therefore intiate cntrl
actvty.
Physical and replaceable part of a
system that conform to and provides
realizn of a set of interfaces
a run-time physical object that
represents a computational resource.
active class
component
node
Syntax
Place order
8. 2.Behavioral Things
Construct
1.Interaction
2.State machine
Description
A set of msgs exchangd
among a set of objts vd in
a particular context to
accomplish a specific
purpose.Involves no.of
other elements including
msgs,action sequences
and links
Specifies sequences of
state of an objt goes thru
during its lifetime
response to those
events.Involves no.of
other elements includn
states,transtn,evnts
syntax
display
Waiting
9. 3.Grouping things
Organizational parts of UML models.
Models decomposed in to boxes
Primary kind is Package
Packages are basic grouping things with which UML
model can be organized.
Business rules
10. 4.Annotational things
Explanatory parts of UML models.
Comments to describe illuminate or remark about
any element in a model.
Primary kind of annotation thing called note.
Note is simply a symbol for rendering constraints
and comments attached to an element or collection
of elements.
11. II. Relationships in the UML
Construct
Description
a relationship between two modeling
elements, in which a change to one
modeling element (the independent
element) will affect the other modeling
element (the dependent element).
a relationship between two or more
association
classifiers that involves connections
among their instances.
Aggregation is a spl kind of assocn
represntn structural reltnshp b/w
whole and its parts
generalization Objts of specialized element(child) are
substitutable for objts of the
generalized element(parent).
a relationship between a specification
realization
and its implementation.
dependency
Syntax
12. III. Diagrams in the UML
1.Class diagram
2.Object diagram
3.Use case diagram
4.Sequence diagram
5.Collaboration diagram
6.Statechart diagram
7.Activity diagram
8.Component diagram
9.Deployment diagram
13. 1.CLASS DIAGRAM
It depicts the static view of a model
It is the basic building block of the object oriented system
It illustrate the relation ship between classes in the system
Class diagram consist of:
Class diagram
It consist of rectangle with three compartments
Class name is added in this this compartment (teacher)
Class attribute is added in this department (name )
Class methods are placed in this compartments (teach)
14. 2.OBJECT DIAGRAM
• Object diagrams emphasize the relationship
between instances of classes at some point in time
Object is shown by a rectangular with classifier
name in the center f rectangular and under line.
15. 3.USE CASE DIAGRAM
This diagram consist of:
Actor
It is represented by a human, either the actor is a human
Or and external system.
Actor is role
Use case
It is represented by an oval shape with title in it
16. 4.SEQUENCE DIAGRAM
Sequence diagrams provide a graphical
representation of object interactions over time
The diagrams show the flow of messages from one
object to another, and as such correspond to the
methods and events supported by a class/object.
17. 5.COLLABORATION DIAGRAM
Type of an interaction diagram emphasizes structural organization of objt that
send and receive msgs
Collaborates the static and dynamic relationship
Each message in a collaboration diagram has a sequence number.
•
18. 6.STATECHART DIAGRAM
A statechart diagram shows the possible states of the object and the transitions that
cause a change in state.
States are rounded rectangles.
Transitions are arrows from one state to another.
Events or conditions that trigger transitions are written beside the arrows.
19. 7.ACTIVITY DIAGRAM
Activity diagram is also dynamic view of the system
Activity diagram is used to describe the individual use case
Use case is used to describe the user goal
Activity diagram’s similar to flow charts
Each activity consist of series of actions
Actions are represented by oval shapes
Actions are connected by arrows
Arrow shows the flow of the activity diagram
Activity diagram also shows decision points called decision
node
21. 8.COMPONENT DIAGRAM
• Shows the organizations and dependencies among software
components.
Shows system in terms of modules.
22. 9.DEPLOYMENT DIAGRAM
Shows the configuration of run-time processing elements
and the software components, processes and objects that
live on them.
Deployment diagrams may be used to show which
components may run on which nodes.