Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 28

O B J E C T O R I E N T E D A N A LY S I S &

DESIGN THROUGH UML


By

Md. Wasim
&
Baldeep

30th November 2009 1


UML Introduction

UML stands for “Unified Modeling Language”. UML is a standard


visual modeling language.
It is a industry-standard graphical language for specifying,
visualizing, constructing, and documenting the artifacts of software
systems.
The UML uses mostly graphical notations to express the OO analysis
and design of software projects.
Simplifies the complex process of software design.
UML is a unified process

30th November 2009 2


The UML Is a Language for Visualizing

Communicating conceptual models to others is prone to error unless


everyone involved speaks the same language.
There are things about a software system you can’t understand unless
you build models.
An explicit model facilitates communication.

30th November 2009 3


THE UML IS A LANGUAGE
FOR SPECIFYING

The UML builds models that


are precise, unambiguous, and
complete.

30th November 2009 4


The UML Is a Language for Constructing

•UML models can be directly connected


to a variety of programming languages.
Maps to Java, C++, Visual Basic, and
so on
Tables in a RDBMS or persistent store
in an OODBMS
Permits forward engineering
Permits reverse engineering

30th November 2009 5


THIS SESSION

 Introduction to Modeling
 Class Diagrams
 Use Case Diagrams
 Sequence Diagrams

30th November 2009 6


INTRODUCTION TO MOD EL IN G

What is a model ?
 A model is a simplification of realty.

Why do we model ?
 We build models so that we can better
understand the system we are developing

30th November 2009 7


Click icon to add picture

HOW CAN YOU REALIZE THE


BENEFITS OF MODELING ?

30th November 2009 8


Diagrams

Diagrams graphically depict a view of a part of your


model.
Different diagrams represent different views of the system
that you are developing.
A model element will appear on one or more diagrams.

30th November 2009 9


UML Diagrams in Software Architecture

Use case
diagrams

Sequence Class
Diagrams diagrams

Collaboration Object
diagrams Diagrams
UML
MODELS

State
Component
Machine
Diagrams
Diagrams

Activity Deployment
Diagrams Diagrams

30th November 2009 10


Classification of UML

 Structural model view


1) class diagrams
2) object diagrams
 user model view
1) use case diagrams
 Behavioral model view
1) sequence diagrams
2) state machine diagrams
3) activity diagrams
 Implementation model view
1)component diagrams
 Environment model view
1) deployment diagrams

30th November 2009 11


STRUCTURAL MODEL VIEW

 Class Diagrams
 Object Diagrams

30th November 2009 12


Structure of a Class
A class diagram represents a set of classes, interfaces, and
their relationships. You can represent a class in a
rectangular box with three compartments .The first
compartment shows the class name. The second
compartment shows the attributes of the class and the third
compartment shows the methods associated with the class
Class
A description of a set
of objects

Aggregation
Represents a part-whole
relationship
Attribute
Named property of
a class

Operation
Class behavior
Generalization
Shows an inheritance
relationship
30th November 2009 13
Object Diagram

An Object diagram represents the instances of a class


diagram. You represent an object in a rectangular box
with two compartments. The object name appears before
the class name in the first compartment. The second
compartment shows the attributes of the objects.

30th November 2009 14


USER MODEL VIEW

Use Case Diagrams

30th November 2009 15


What is a Use-Case Model?

A Use case diagram depicts the various operations that a system performs. It
contains use cases, actors and their relationships. Use cases are the sequence
of actions that forms a single unit of work for an actor. An actor represents a
user who is external to the system and interacts with the use case

30th November 2009 16


BEHAVIORAL MODEL
VIEW
Sequence Diagrams
State Machine Diagrams
Activity Diagrams

30th November 2009 17


Sequence Diagram
Sequence diagram represents an interaction between objects
in the form of messages ordered in a sequence by time.

30th November 2009 18


State Machine Diagram

A state machine diagram shows how a class reacts when an event


occurs. We can draw a state machine diagram by using the
classes and the use cases identified for the system

Out of stock In Stock

30th November 2009 19


Activity Diagram
Action
A step in the flow of events

Decision
Flows split based on a guard
condition

Fork
Beginning of concurrent flows

Join
End of concurrent flow

Flow
Show the sequence of
activities

30th November 2009 20


IMPLEMENTATION MODEL
VIEW
component diagrams

30th November 2009 21


Component Diagrams

we combine packages or individual entities to form


components. You can depict various components and their
dependencies using a component diagram.

30th November 2009 22


ENVIRONMENT MODEL
VIEW
Deployment diagrams

30th November 2009 23


Deployment Diagrams

A deployment diagram shows the physical placement of


components in nodes over a network. A deployment can
be drawn by identifying nodes and components .

30th November 2009 24


How Many Diagrams Need to be Created ????????

• Depends:
 You use diagrams to visualize the system from
different perspectives.
 No complex system can be understood in its
entirety from one perspective.
 Diagrams are used for
communication
• Model elements will appear on one or
more diagrams.
 For example, a class may appear on
one or more class diagrams, be
represented in a state machine
diagram, and have instances
appear on a sequence diagram.
 Each diagram will provide a
different perspective.

30th November 2009 25


REFERENCES
www.rational.net
http://scribd.com/
http://uml.tutorials.trireme.com/

www.rational.com

Book:
Applying UML & Patterns –Craig Larmen

30th November 2009 26


ANY QUESTIONS ????

30th November 2009 27


30th November 2009 28

You might also like