Intoduction to uml

38

description

This ppt will provide a brief idea on what is UML, different kind of diagrams in UML and relationships in UML

Transcript of Intoduction to uml

Page 1: Intoduction to uml
Page 2: Intoduction to uml

WHAT IS UML ?WHAT IS UML ?

• Unified Modeling Language is a modeling language for software blueprint.

• It is a standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems.

• It was developed by Booch, Jacobson andRumbaugh.

Page 3: Intoduction to uml

WHAT UML IS NOT ?WHAT UML IS NOT ?

• It’s not an algorithm specification language..

• It’s not a development process.It’s not a development process.

• It’s not a programming language.It’s not a programming language.

• It’s not a caseIt’s not a case tool. tool.

Page 4: Intoduction to uml

GOALS OF UMLGOALS OF UML

• Provide users with a ready-to-use,

expressive visual modeling language

so they can develop meaningful model.

• Provide extensible and specialization mechanisms to extend the core concept.

• Be independent of programming language and development processes.

Page 5: Intoduction to uml

TYPES OF UML DIAGRAMSTYPES OF UML DIAGRAMS

Each UML diagram is designed to let developers and customers view a software system from a different perspective.

1. Use Case Diagram : Displays the relationship among actors and use cases.

2. Class Diagram : Models class structure and contents using design elements such as classes, packages and objects. It displays relationships such as inheritance and associations etc.

Page 6: Intoduction to uml

3. Interaction Diagram : Sequence Diagram : Displays the time

sequence of the objects participating in the interaction.

Collaboration Diagram : Displays an interaction organized around the objects and their links to one another.

4. Statechart Diagram : Displays the sequences of states that an object of an interaction goes through during its life in response to received stimuli/event.

Page 7: Intoduction to uml

5. Activity Diagram : Displays a special state diagram where most of the states are action states and most of the transitions are triggered by completion of the actions in the source states. In this diagram

Focus is on flows driven by processing. 6. Physical Diagrams :

Component Diagram : Shows the organization and dependencies among a set of components. Involves the modeling of physical things that reside on a node – such as executables, libraries, tables, files and documents.

Page 8: Intoduction to uml

Deployment Diagram : Displays the configuration of run-time processing elements and the software components, processes and objects that live on them.

Page 9: Intoduction to uml

ARCHITECTURE OF AARCHITECTURE OF ASOFTWARE SYSTEMSOFTWARE SYSTEM

Page 10: Intoduction to uml

• Use Case View : It describes the behavior of the system typically as seen by the end user.

• Design View : It encompasses the classes, interfaces and collaborations that make up the system. Shows how functional requirement have been implemented.

• Process View : It encompasses the threads and processes that make up the system.

Page 11: Intoduction to uml

• Implementation View : It encompasses the components, files and packages that are used to assemble the system.

• Deployment View : It encompasses nodes that form the system and addresses the distributivity and installation of system.

Page 12: Intoduction to uml

ELEMENTS OR THINGS OF UMLELEMENTS OR THINGS OF UML

Many elements or things that must be well

understood to draw UML diagrams are broken

down into following categories :

• Structural Elements • Behavioral Elements• Grouping Elements• Annotations

Page 13: Intoduction to uml

• STRUCTURAL ELEMENTS :

They are the static parts of the model usually represents the static concepts or physical entities with system. Classes Interfaces Collaboration Use case Active classes Components Nodes

Page 14: Intoduction to uml

• BEHAVIORAL ELEMENT : These are the dynamic parts of the model. They represent the behaviour of the staticelements of the model.

Messages : Represents messages exchanged between objects and represents flow of the system.

States : Represents the state of an object at a particular point in time. States allow objects to make choices about how to respond to an event.

Page 15: Intoduction to uml

• ANNOTATION ELEMENTS:

These are explanatory elements of the UML.

These are used to describe other things

represented by a single element. Note

Page 16: Intoduction to uml

RELATIONSHIPS IN UMLRELATIONSHIPS IN UML

There are 4 types of relationships :

1. Dependency

2. Association

3. Generalization

4. Realization

Page 17: Intoduction to uml

0..1 *

employer employee

• DEPENDENCY :It is a semantic relationship between two thingsthat represents that a change to the independentelement will affect the dependent element.

-------• ASSOCIATION :It represents a structural relationship (usually among the classes). It has name, multiplicity,source and target, role names.

Page 18: Intoduction to uml

• GENERALIZATION :

It indicates specialized element is substitutable

For a generalized element. It represents is-a kind

Of relationship.

• REALIZATION :

It is a semantic relationship that specifies a contract between a specifier and a provider. It exist only between interfaces and classes or components and use cases and collaboration.

----------|

Page 19: Intoduction to uml

COMMON MECHANISMSCOMMON MECHANISMS

1. NOTES : A note is a graphical symbol for

rendering constraints or comments attached to

a element.

2.STEREOTYPES : Allows to create new kind of building blocks similar to existing ones but specific to our problem

<<exception>

Underflow

Page 20: Intoduction to uml

3. TAGGED VALUES :Tagged value is

denoted by (name, value) pair that describes the

property of a model element.

Server

{Processor = 3}

Page 21: Intoduction to uml

4. CONSTRAINTS : Graphically, a

Constraint is rendered as a string enclosed by

Brackets and placed near the associated element.

Portfolio

Bank Account

{secure} Corporation

Person

Gender :{male , female}

{or}

Page 22: Intoduction to uml

USE CASE DIAGRAMUSE CASE DIAGRAM

• A use case diagram specifies the behavior of a system or a part of a system and is a description of a set of sequences of actions.

• Components of Use Case Model : Actor Use Case

Page 23: Intoduction to uml

• Relationships in Use Case Model : communicates Relationship :

<<communicates>> Use Case

uses or includes Relationship :Place order Validate Customer

extends Relationship:

Base usecase

Place order

Overdraw amount<<uses>> <<extends>>

Page 24: Intoduction to uml

.

Get balance

Validate user

Withdraw money

Maintain ATM

Overdraw money

<<extends>>

<<extends>><<uses>>

<<Uses>>

Maintenance person

Save transaction

Database

customer

Page 25: Intoduction to uml

CLASS DIAGRAMCLASS DIAGRAM• A class diagram shows a set of classes,

interfaces, collaborations and their relationships.

• Class diagram contains following things : Classes Interfaces Collaboration Dependency, Generalization and

Association relationships.

• It may contain notes and constraints.

Page 26: Intoduction to uml

.

Company

Department Office

name : Name Address : string

Person

Name : String

Eid : Integer

getPhoto(P:Photo)

getContactInfo()

getPersonalInfo()

Head Quarters

generalization

0..1

1

1..* 1..*

Personnel_Record

Contact_Info

dependency

member

role

Tax ID

Salary Isecure information

Interface

Page 27: Intoduction to uml

SEQUENCE DIAGRAMSEQUENCE DIAGRAM

• Sequence diagram shows, for a particular scenario, the events that external actors generate, their order, and inter-system events.

Page 28: Intoduction to uml

.

: System

: CashierMake a new sale

enterItem( itemID , quantity )

Description , total

[more items]

loop

end sale

total with taxes

make payment(amount)

receipt

Process Sale Scenario

Page 29: Intoduction to uml

COLLABORATION DIAGRAMCOLLABORATION DIAGRAM

• Collaboration diagrams model the interactions between the object.

• It is the cross between an object diagram and sequence diagram.

• Notations used : Object Actor Message

Page 30: Intoduction to uml

..

..

1. Find user

2. Update user WebApp : user

interface

User validator2.1 Validate user

User database1.1 Lookup user

2.1 Look user

Collaboration Diagram

Page 31: Intoduction to uml

STATE CHART DIAGRAMSTATE CHART DIAGRAM

• A State Chart Diagram relates events and states. When an event is received, the next state depends on the current state as well as the event; a change of state caused by an event is called as transition.

• A State Diagram is a graph whose nodes are states and whose directed arcs are transitions states.

Page 32: Intoduction to uml

.

State Chart Diagram

Page 33: Intoduction to uml

ACTIVITY DIAGRAMACTIVITY DIAGRAM

• Activity diagram shows the flow from activity to activity within a system.

• Activity diagram commonly contains: Activity State Action State Transitions Objects Forks and Join Branching Swimlanes

Page 34: Intoduction to uml
Page 35: Intoduction to uml

.

Customer Sales Warehouse

Swimlanes

• Request Product

Process Order

O : order

[in progress]

Pull Material

Ship Order

Receive order

Bill customer

Pay Bill

b: bill [paid]

b: bill [unpaid]

O : order [filled]

state

Close order

• Final state

Page 36: Intoduction to uml

COMPONENT DIAGRAMCOMPONENT DIAGRAM• A component is a physical replaceable part of

a system that conforms to and provides the realization of a set of interfaces.

• COMPONENTS AND CLASSES :1. Class are logical abstraction; while

components represent physical thing.2. Component represent physical packaging of

logical components.3. Classes may have attributes and operations.

Component have only operations that are reachable only through their interfaces.

Page 37: Intoduction to uml
Page 38: Intoduction to uml

THANK YOU…!!!THANK YOU…!!!