bell - uml in an hour

Upload: ears7777

Post on 09-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 Bell - UML in an hour

    1/30

    A Brief Introduction toUML

    orUML in an Hour

    (more or less)Copyright 2000 by RWD Technologies Inc.

    All Rights Reserved

  • 8/7/2019 Bell - UML in an hour

    2/30

    2/3/2011 2

    Wha t is t he UML?

    Unified Modeling LanguageIt is a modeling language, not a processRumbaugh joined Booch at Rational in 1994; in1995, Rational added Jacobsen to their team. In1996, work on the UML was begun.In January of 1997, Rational released UML 1.0 tothe OMG as their proposal for a methodsstandard.

  • 8/7/2019 Bell - UML in an hour

    3/30

    2/3/2011 3

    Obj ectives

    Upon successful completion of thispresentation, you will be able to: V isually identif y UML di agr ams.

    Underst and t he differences between t he UMLdiagr ams. Identif y key sym bols found in e ach diagr am. Identif y the di agr ams used in e ach Pro V ision

    phase.

  • 8/7/2019 Bell - UML in an hour

    4/30

    2/3/2011 4

    UML Di agr ams to be Covered

    C lass DiagramsUse C ase DiagramsC ollaboration Diagrams

    Sequence DiagramsPackage DiagramsC omponent DiagramsDeployment Diagrams

    Activity DiagramsState Diagrams

  • 8/7/2019 Bell - UML in an hour

    5/30

    2/3/2011 5

    Class Di agr ams

    Are the most fundamental UML Diagram.Describe the classes in the system, and thestatic relationships between classes.C

    lass diagrams are used during Analysis,Design and Development.

  • 8/7/2019 Bell - UML in an hour

    6/30

    2/3/2011 6

    UML C lass Di agr am

    DVD Movie VHS Movie Video Game

    Rental Item{abstract}

    Rental Invoice

    1..* 1

    Customer

    Checkout Screen

    1

    0..1

    1

  • 8/7/2019 Bell - UML in an hour

    7/30

    2/3/2011 7

    UML C lass Di agr am

    DVD Movie VHS Movie Video Game

    Rental Item{abstract}

    Rental Invoice

    1..* 1

    Customer

    Checkout Screen

    0..1

    1

    SimpleAssociation

    Class

    AbstractClass

    SimpleAggregation

    Generalization

    Composition(Dependency)

    Multiplicity

  • 8/7/2019 Bell - UML in an hour

    8/30

    2/3/2011 8

    IDEF1X 97 Class Di agr am

    Rental Invoice

    Customer

    Checkout Screen

    Class Relationship

    Multiplicity/Cardinality

    DVD Movie VHS Movie Video Game

    Rental Item

    Dependentclass

    Base classis abstract

    Generalization(cluster)

  • 8/7/2019 Bell - UML in an hour

    9/30

    2/3/2011 9

    Parts of a Class

    C lasses can have four parts N ame Attri butes O per ations R esponsi bilities

    C lasses can show visibilityand types.

    All parts but the Name areoptional.

    MyClass N ame

    +So mePu blicAttri bute : So meTy pe

    -SomePriv ateAttri bute : So meTy pe

    #So meProtectedAttri bute : So meTy pe

    +ClassMet hodOne()

    +ClassMet hodTwo()

    R esponsi bilities

    -- can option ally be descri bed here.

  • 8/7/2019 Bell - UML in an hour

    10/30

    2/3/2011 10

    Obj ect Di agr ams

    An Object is an instance of aclass.

    Object names are underlined.

    Object diagrams are similar toclass diagrams. Many of thesame notations are used.Object diagrams captureinstances of classes, and allowthe dynamic relationships to

    be shown.

    ThisOne : M yClass N ame

    +So mePu blicAttri bute : So meTy pe

    -SomePriv ateAttri bute : So meTy pe

    #So meProtectedAttri bute : So meTy pe

    +ClassMet hodOne()

    +ClassMet hodTwo()

  • 8/7/2019 Bell - UML in an hour

    11/30

    2/3/2011 11

    Class and Obj ect Di agr ams

    0..1

    0..n

    Customer Rental Item

    Rents+name:string+id:integer

    +released:date+id:integer

    Joe: Customer Casablanca: Movie

    +name:Joe Smith

    +id:1667

    +released:1942

    +id:22340

    Class Diagram

    Object Diagram

    Class Name

    Object NameAttributes

    Association Name

  • 8/7/2019 Bell - UML in an hour

    12/30

    2/3/2011 12

    Stereotypes, TaggedValues and C onstraintsextend the UML Stereot y pes are

    shown usin g Tagg ed V alues and

    Constr aints areshown usin g { }

    R entalContr act

    {version=1.1}

    List Of R entedIte ms

    Custo mer {ordered by title}

    Constr aint

    Tagged V alue

    Stereot y pe

    Stereot y pes, T agg ed V alues and Constr aints

  • 8/7/2019 Bell - UML in an hour

    13/30

    2/3/2011 13

    Use C ases

    Describe interactions between users andcomputer systems (both called actors) .C apture user-visible functions.

    Achieve discrete measurable goals.May be small (M ake se lected text bold) lar ge (Gener ate a ta ble of contents)Are typically used during Analysis and Design.

  • 8/7/2019 Bell - UML in an hour

    14/30

    2/3/2011 14

    Use C ase Di agr am

    TelephoneCustomer

    In-StoreCustomer

    Clerk

    Identify Movie

    Open Account

    Return Movie

    Customer

    Review Account Status

    Actor

    Use Case

  • 8/7/2019 Bell - UML in an hour

    15/30

    2/3/2011 15

    Use C ase R eport

    The Use C ase Reportprovides documentationfor the Use C ase.

    A Use C ase is not

    complete without thereport.The elements of the UseC ase Report are shownon the right.

    Brief descriptionPreconditionFlow of events Main f low Su bf lows Altern ate f lows

    PostconditionSpecial RequirementsEnclosures Diagr ams Pictures of t he UI

  • 8/7/2019 Bell - UML in an hour

    16/30

    2/3/2011 16

    Extends and Inc ludes R elations hips

    Extends

    Inc ludesF ind Item

    by Title

    F ind Itemsby Actor

    Search Movie

    Database

    includes

    includesCustomer

    Dependency

    extends

    Stereotype

    Check InMovie

    AssessLate Fees

    Clerk

  • 8/7/2019 Bell - UML in an hour

    17/30

    2/3/2011 17

    Colla bor ation Di agr ams

    C ollaboration diagrams describe objectinteractions organized around the objects andtheir links to each otherFocus on exchange of messages between objectsthrough their associations.Appears during Analysis phaseEnhanced during Design phase

  • 8/7/2019 Bell - UML in an hour

    18/30

    2/3/2011 18

    :Check-outManager

    :Customer

    :Inventory

    1: enter_customer()

    3: enter_movies()

    5: add(customer, movies)

    7: print invoice() 2: IsValidCust(CustId)

    4:GetMovieByBarcode()

    Colla bor ation Di agr am - R ent Movie

    :Clerk

    Object

    Message

    :Rented Items

    8: generateRentalTotal()

  • 8/7/2019 Bell - UML in an hour

    19/30

    2/3/2011 19

    Sequence Di agr ams

    C an be morphed from C ollaboration Diagrams.Describe interactions between objects arranged in timesequenceFocus on objects and classes involved in the scenario

    and the sequence of messages exchangedAssociated with use casesUsed heavily during Analysis phase and are enhancedand refined during Design phase

  • 8/7/2019 Bell - UML in an hour

    20/30

    2/3/2011 20

    Sequence Di agr am - R ent Movie

    1: find customer()2: search (string)

    4: search (string)

    6: add(Cust, item)

    3: enter movie()

    5: rent (movie)

    7: printInvoice() 8: generateRentalTotal()

    Object

    Lifeline

    ActivationMessage

    :CheckoutMgr :InventoryCust:Customer :RentedItems:Employee

  • 8/7/2019 Bell - UML in an hour

    21/30

    2/3/2011 21

    Pack age Di agr am

    C lerk User Interface

    facadeusinessyste

    C lient

    (to businesssyste )Custo er ata

    ental creenClass

    Package

  • 8/7/2019 Bell - UML in an hour

    22/30

    2/3/2011 22

    Com ponent Di agr am

    app ca onV deo

    Works a on(vs a on exe)

    braryDB Server

    n er ace(dbsvr d )

    Supp ed byM croso

    brary

    App ca onFramework(app r d )

    Component

    Interface

    Dependency

    Note

  • 8/7/2019 Bell - UML in an hour

    23/30

  • 8/7/2019 Bell - UML in an hour

    24/30

    2/3/2011 24

    Identif y Caller

    CreateAccount

    Obtain N ame& Address

    O penAccount?Current

    Custo mer? [no] [no]

    [yes] [yes]

    Action State

    Start State

    Decision

    End State

    Activit y Diagr am

  • 8/7/2019 Bell - UML in an hour

    25/30

    2/3/2011 25

    Identif y Movie

    PlaceOrder

    Place

    Order

    FillOrder

    Pay

    Deliver Movie

    PickupMovie

    Custo mer M anager Wal kin g Clerk F ork Point

    Join Point

    CollectMone y

    Swi mla nes and Fork/Join Points

  • 8/7/2019 Bell - UML in an hour

    26/30

    2/3/2011 26

    State Di agr am

    Validate

    do/ heckaccoun t

    cus tome r appea r s

    Ch eck-Out

    do/check -ou tideo

    [accoun t a lid]/ e t fir s t ideo

    [mo r e ideos ]/ e t nex t ideo

    Ch eck-OutComp lete

    [no mo r e ideos ]

    [accoun t no ta lid]State

    Transition

    Activity

    Guard

    Action

    Event

  • 8/7/2019 Bell - UML in an hour

    27/30

    2/3/2011 27

    UML Di agr am Usage

    D v lopm ntPh s UML Di gr ms

    Analysis se Cases, Class Diagrams, ActivityDiagrams, Collaboration Diagrams,Sequence Diagrams

    Design Class Diagrams, CollaborationDiagrams, Sequence Diagrams, StateDiagrams, Component DiagramsDeployment Diagrams

    Development Collaboration Diagrams, SequenceDiagrams, Class Diagrams, State

    Diagrams, Component Diagrams,Deployment DiagramsImplementation Package Diagrams, Deployment

    Diagrams

  • 8/7/2019 Bell - UML in an hour

    28/30

    2/3/2011 28

    Conc lusion

    UML is a robust notation that can expressinformation gathered throughout a projectslifecycle.Adopting standard use of UML can improvecommunication between clients andInformation Systems Service Providers.UML can be used as an effective data modeling

    tool as well as an object modeling tool.

  • 8/7/2019 Bell - UML in an hour

    29/30

    2/3/2011 29

    Questions If I dont know theanswer, maybe I can

    make one up!

  • 8/7/2019 Bell - UML in an hour

    30/30

    2/3/2011 30

    For more infor mation

    C ontact:John T. BellRWD Technologies Inc.10480 Little Patuxent ParkwayC olumbia, MD 21044

    Phone: 410-884-2453email: [email protected]

    http://www.rwd.com