uml

22
Visualizing Specifying Constructing Documenting UML (Unified Modeling Language)

Upload: jismy-kjose

Post on 27-Jun-2015

465 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Uml

Visualizing Specifying

Constructing Documenting

UML(Unified Modeling

Language)

Page 2: Uml

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 developingAchieve 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.

Page 3: Uml

Applications of UML

Enterprise infmn sys.Banking and financial services.TelecommunicationsTransportationDefense/aerospaceMedical electronicsScientificDistributed Web-based services

Page 4: Uml

Building blocks of UML

I. ThingsII. RelationshipsIII. DiagramsThings in the UML: Four kinds:1. Structural things2. Behavioral things3. Grouping things4. Annotational things

Page 5: Uml

Structural things

Seven kinds:1. Class2. Interface3. Collaboration4. Use case5. Active class6. Component7. Node

Page 6: Uml

Structural things..

Construct Description Syntax

class a description of a set of objects that share the same attributes, operations, methods, relationships and semantics.

interface Collection of operation that specify service of a class or component.Complete behavr.of class/compnt.describes externally visible behavr of an element.

ispelling

collaboration 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

Page 7: Uml

Structural things..

Construct Description Syntax

use case Description of set of sequence of action that a sys performs. Used to structure the behavioral things in a model

active class A class whose objts own one or more processes and therefore intiate cntrl actvty.

component Physical and replaceable part of a system that conform to and provides realizn of a set of interfaces

node a run-time physical object that

represents a computational resource.

Place order

Page 8: Uml

2.Behavioral Things

Construct Description syntax

1.Interaction 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

2.State machine 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

display

Waiting

Page 9: Uml

3.Grouping things

Organizational parts of UML models.Models decomposed in to boxesPrimary kind is PackagePackages are basic grouping things with

which UML model can be organized.

Business rules

Page 10: Uml

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.

Page 11: Uml

II. Relationships in the UML

Construct Description Syntax

dependency 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).

association a relationship between two or more 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).

realization a relationship between a specification and its implementation.

Page 12: Uml

III. Diagrams in the UML

1.Class diagram2.Object diagram3.Use case diagram4.Sequence diagram5.Collaboration diagram6.Statechart diagram7.Activity diagram8.Component diagram9.Deployment diagram

Page 13: Uml

1.CLASS DIAGRAM

It depicts the static view of a model It is the basic building block of the object oriented

systemIt illustrate the relation ship between classes in the

systemClass 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)

Page 14: Uml

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.

Page 15: Uml

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

Page 16: Uml

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.

Page 17: Uml

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.

Page 18: Uml

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.

Page 19: Uml

7.ACTIVITY DIAGRAM

Activity diagram is also dynamic view of the systemActivity diagram is used to describe the individual

use case Use case is used to describe the user goalActivity diagram’s similar to flow chartsEach activity consist of series of actionsActions are represented by oval shapes Actions are connected by arrowsArrow shows the flow of the activity diagramActivity diagram also shows decision points called

decision node

Page 20: Uml

ACTIVITY DIAGRAM..

Portion line Starting point Action Decision node

Actions

Endpoint

Page 21: Uml

8.COMPONENT DIAGRAM

• Shows the organizations and dependencies among software components.

Shows system in terms of modules.

Page 22: Uml

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.