Sie sind auf Seite 1von 49

1

INTRODUCTION TO
UML

Anshul Saxena
Sr. Functional Consultant

1/9/2013
About Presentation
2

 Will attempt to introduce you to UML


 Not possible to teach all in one lecture!
 Not even possible to cover basics
 Requires that you study on you own after
 Goal is to get you familiar
 Make use of on-line tutorials, books, etc.

1/9/2013
What is UML
3

 UML-Unified Modeling Language


 Standard language for specifying, visualizing,
constructing and documenting the artifacts of
software systems.
 UML is not “process”. (That is, it doesn’t tell
you how to do things, only what you should
do.)

1/9/2013
Need Of UML
4

 Let's look at this question from the point of


view of the construction trade. Architects
design buildings. Builders use the designs to
create buildings. The more complicated the
building, the more critical the communication
between architect and builder. Blueprints are
the standard graphical language that both
architects and builders must learn as part of
their trade.

1/9/2013
Continue….

Designe
Developer r

Communicat
ion

Need Of UML
5 1/9/2013
UML Diagrams
6

 There are different types of UML diagram, each


with slightly different syntax rules:
 use cases.
 class diagrams.
 sequence diagrams.
 package diagrams.
 state diagrams
 activity diagrams
 deployment diagrams.

1/9/2013
Categories- UML Diagrams

7 1/9/2013
More Detail-Views
8

1/9/2013
Continue…
9

Structural Behavior Implementation Environmental


• Class • Sequence • Component • Deployment
• Object • Activity
• Collaboration
• State

1/9/2013
Use Case Diagram
10

 In many design processes, the use case


diagram is the first that designers will work with
when starting a project.
 Use case describes events.
 A use case made of a set of Scenarios and
Actor.
 A use case describes relation ship between
actor and scenarios.
 We are concern about Roles.

1/9/2013
Continue…
11

Use Case describes “what” a system does rather “How”


from the standpoint of an external observer.

1/9/2013
Continue…
12

Provides system requirements from the user’s point of view

1/9/2013
Use Case- Dependencies
13

 Association
I. <<Uses>>
 Generalization
I. <<Include>>
II. <<Extends>>

1/9/2013
Association
14

 Association are drawn between actors and


use cases to show that actor carries out ause
case

1/9/2013
Generalization
15

 When a use case describes a variation on


another use case.

1/9/2013
Includes
16

 Already Included/can be necessary

1/9/2013
Extends
17

 Additional action sequences into the base use-


case sequence

1/9/2013
Out come of Use case
18

 Determining features (requirements). New


use cases often generate new requirements as
the system is analyzed and the design takes
shape.
 Communicating with clients. Their notational
simplicity makes use case diagrams a good
way for developers to communicate with
clients.
 Generating test cases. The collection of
scenarios for a use case may suggest a suite
of test cases for those scenarios.
1/9/2013
Class Diagram
19

 A Class diagram gives an overview of a


system by showing its classes and the
relationships among them. Class diagrams are
static -- they display what interacts but not
what happens when they do interact.

1/9/2013
Continue

20 1/9/2013
Continue…
21

 association -- a relationship between instances of the


two classes. There is an association between two
classes if an instance of one class must know about
the other in order to perform its work. In a diagram, an
association is a link connecting two classes.
 aggregation -- an association in which one class
belongs to a collection. An aggregation has a diamond
end pointing to the part containing the whole. In our
diagram, Order has a collection of Order Details.
 generalization -- an inheritance link indicating one
class is a super class of the other. A generalization
has a triangle pointing to the super class. Payment is
a super class of Cash, Check, and Credit.

1/9/2013
Continue…
22

 A navigability arrow on an association shows


which direction the association can be traversed
or queried. An Order Detail can be queried about
its Item, but not the other way around. The arrow
also lets you know who "owns" the association's
implementation; in this case, Order Detail has an
Item. Associations with no navigability arrows are
bi-directional.
 The multiplicity of an association end is the
number of possible instances of the class
associated with a single instance of the other end.
Multiplicities are single numbers or ranges of
numbers. In our example, there can be only one
Customer for each Order, but a Customer can
have any number of Orders. 1/9/2013
Sequence diagram
23

 A sequence diagram is an interaction


diagram that details how operations are
carried out –
 what messages are sent and when.
 Sequence diagrams are organized according
to time.
 The time progresses as you go down the
page. The objects involved in the operation are
listed from left to right according to when they
take part in the message sequence
1/9/2013
Continue…
24

1/9/2013
State chart Diagram
25

 Objects have behaviors and state. The state of


an object depends on its current activity or
condition.
 A statechart diagram shows the possible
states of the object and the transitions that
cause a change in state.

1/9/2013
Continue…
26

1/9/2013
Activity Diagram
27

 An activity diagram is essentially a fancy


flowchart. Activity diagrams and statechart
diagrams are related.
 While a statechart diagram focuses attention
on an object undergoing a process (or on a
process as an object), an activity diagram
focuses on the flow of activities involved in
a single process. The activity diagram shows
the how those activities depend on one
another.
1/9/2013
Continue…
28

1/9/2013
Example-weather monitoring
29
system

1/9/2013
Use Case Diagram
30

1/9/2013
Use Case Diagram
31

1/9/2013
Continue…
32

1/9/2013
Continue…
33

1/9/2013
Class Diagram
34

1/9/2013
Continue…
35

1/9/2013
Sequence Diagram
36

1/9/2013
Continue…
37

1/9/2013
Collaboration Diagram
38

1/9/2013
Continue…
39

1/9/2013
State Diagram
40

1/9/2013
Continue…
41

1/9/2013
Activity Diagram
42

1/9/2013
Continue…
43

1/9/2013
Component Diagram
44

1/9/2013
Component Diagram
45

1/9/2013
Deployment Diagram
46

1/9/2013
Deployment Diagram
47

1/9/2013
48
Next Sep is to Generate the
code
Whatever language has been specified and
elected by the Project Team/Client.

1/9/2013
49 Thanks for your Patience
Queries????

1/9/2013

Das könnte Ihnen auch gefallen