Belajar UML

download Belajar UML

If you can't read please download the document

description

Belajar UML

Transcript of Belajar UML

  • 1

    ! " # ! $ ! % !

    ! ! !

  • 2

    # % & $ ( ) *

    # ++ ! !

    ! ++ , %

    ) - . # ! , / ! . # ,

    ! !

    ! ! %

    "! ! ! ! !

    ! ! ! 0 ! !

    !

    - # ) ! ! /

  • 3

    12. 3 ! ++# & % -

    4 5+ , % + ! # % 36& , 0 317718

    9 - 4 5+ , % + ! ! ! # 36

    ) % 317718

    - 4 5+ , % + ! 0 % 36

    ) % 317: : 8

    ; % - 4 5+ , % + ! - 8

    ) ! ++# , 0 -

    4 5+ , % + ! # ? ! 36) % 3177@8

    - 4 5 ! ++ -? # ! )

    ) 36) = 3177A8

    -! " 4 5# ) - 9 + , % + !

    36 ! ! = 317728

    & % ! 9 - #" 4 5

  • 4

    ! ! ! ++ ! ;

    ) & % 39 3! ; %

    < B ? , , < ) ! ! !

    4 #

  • 5

    ) & % ! 9 177@

    C D8: ! + 1772 $ ; % ! + , % ! , !

    9 ! 1772 < >8DE ! ! < 182E

    Konseptual Fisik

    Logical View

    End-user Fungsi

    Implementation View

    Programmer Manajemen software

    Process View

    PerformansiSkalabilitasThroughput

    Integrator Sistem

    Deployment View

    Topologi SistemDelivery, instalasi

    Komunikasi

    RekayasaSistem

    Use Case View

  • 6

    Booch method OMT

    Unified Method 0.8OOPSLA 95

    OOSEOtherMethods

    UML 0.9Web - June 96

    publicfeedback

    Final submission to OMG, Sep 97

    First submission to OMG, Jan 97

    UML 1.1OMG Acceptance, Nov 1997

    UML 1.3

    UML 1.0UML partners

    UML 2.0!

    UML 1.5

    Meyer

    Before and after conditions

    Harel

    StatechartsGamma, et al

    Frameworks and patterns,

    HP Fusion

    Operation descriptions and message numbering

    Embley

    Singleton classes andhigh-level view

    Wirfs-Brock

    Responsibilities

    Odell

    Classification

    Shlaer - Mellor

    Object lifecycles

    Rumbaugh

    OMT

    Booch

    Booch method

    Jacobson

    OOSE

  • 7

    #

  • 8

    Pemodelan Use Case

    Agenda

    % B

    /

  • 9

    Apakah Use Case itu?

    # $ ; % 177@" 5 % ! !

    ! 6 ) 5& % & G6"

    ! , !

    , ! % &

  • 10

    Use Case vs. Kebutuhan

    # ! 8

  • 11

    Sistem

    & ! ! % 3 !

    ! !

    & ! B & ! B

    4 / ! ! ! 4 # ! %

    ! ( % ! ! !

    Traffic Violations Report System

    Aktor

    ! !

    ! ! 3 ! ! !

    0 - 0 E ! E , ! ! E ,

    ! ! !

    & !

  • 12

    Icon Aktor

    Clerk

    >Clerk

    Relasi antar Aktor & ! ! 3,

    ! 3! ) ! ! % % !

    % 9 ! !

    ClerkSupervisorManager

  • 13

    Identifikasi Aktor

    ! B 3 ! !

    , B # !

    B !

    % "

    Use Case

    !

  • 14

    Menemukan Use Case

  • 15

    Relasi Use Case

    9 & , % 3

    ! ! ! ! % ! %

    HI I % ! JJK ! H K !

    & ! X Y

    Relasi Use Case

    9 ( # , % 3

    ! ! ! ! %

    ! % ,

  • 16

    Relasi Use Case

    9 ) ! !

    ! !

  • 17

    Contoh Traffic Violation Report System (TVRS)

    Remove T.V

    Lookup T.V

    Replace Offender

    New Offender

    Edit T.V.(8)

    Add T.V.(9)

    Clerk

    Supervisor

    Traffic Violations Report System

    OffendersDB

    PolicemenDB

    # $

    HTSSHTSS

    Scan I tems

    Ring Order

    Buy I tems CustomerCashierCatalogCatalog

    Check Status

    Place Order

    Fill Order

    Estb. Credit

    Customer

    Sales Person

    Supervisor

    HTSS: System View

    Catalog: Class View

  • 18

    # $

    # $ % & * * $ % % $ * +%

    $ % $ % , $ $ + * % + , - $ $ + * % $ * , + $ $ %% * $ $ + % * " * * + %

  • 19

    # " # (" # )*+ ,

    Dokter menentukan resep untuk pasien

    Dokter memberikan informasi obat: nama obat, takaran, jumlah dos danrefill

    Komputer melakukan cross-ce antaraobat dan sejarah obat/medis yang sudah ada

    Resep dikirim secara elektronik keapotik atau dicetak untuk pasien

    +

    # $" #

  • 20

    & ! % C0#

    #

  • 21

    ? , % B ? %

    0 & ! 0 0 0

    % % 0

    !

    $! ! ! "% ! ! ! % ) ! % ! !

    % / ! ! / ! % ! %

  • 22

    #

    ? % % & ! $ ! !

    #

    =

    =

    =

    Stereotype yang mendefinisikanelemen model baru dalamhubungandengan elemenmodel lain

  • 23

    ! #

    Actor1

    Actor2

    Model interaksiantarasistem danlingkungan

    Menyimpan danmengaturinformasi dalamsistem

    Koordinasiperilaku use case

    # - & ! ! ,

    ! ! ! 0 %

    4 & ! ! 4 ?! ! % % ! 4 0

    E C #

    0 # % % 4 / ! ! ! 8?!

    ! !

    % ! ! -

  • 24

    # . &

    ! !

    & ! & %

    ?! ! # ! %

    # # ! ! % ! , ! % %

    0 % % , ! ! , % % %

    0 ! % ! %

    0 % % ! !

    3 ! % % %

    ? ! % ! 0 -

    C 0

  • 25

    # 18

  • 26

    / # 0 !

    ! ! % ! %

    0 % & 3 ! % % % ; ! ! % % , 3 %

    ! 4 0 -5 % 6 %

    5 ! ! ! % 6

    0 #! ! ! !

    ! 3! 3 % ! !

    / ! -4 + 4 # "4 4 &

    . - 0 !

    ) ! ! -5 635?C9 6888

    0 ! 0 ! , ! "-5 %

    ! F 6888

    & ! , ! ! ! ! % -5$#635 6359 6888

    & ! ! !

    % 4 0 -5? % 6! 5 ! 6

    ! ! % 5) 6

    / ! 5! ! ! ! % 6 ; ! % 3 -

    59 F 635+ 6

  • 27

    #

    ) ! % ! ! $ ! ! %

    / ! ! , ! % $ $ % !

    ! , , - G 3 3 ! 888 -! 3% 3 888 - 3 3 888 / - 3 3 3% ! 888 - 3 ! 3 ! 888

    ! !

    ! !

  • 28

    # $ # ! 0

    # ! ! ! % ?C9 / ! ! % "-

    Traffic report

    Supervisor

    Report lookup

    Confirmation

    TVRS

    Offender Details Form

    Traffic report addition

    System

    Offender

    Policeman

    Vehicle number

    License number

    Fault

    Traffic policeman

    Commander

    Violation

    ID

    Password

    Police headquarters

    Shutdown

    Date

    Speed

    Traffic Violation

    Clerk

    . #

    Traffic report

    Supervisor

    Report lookup

    Confirmation

    TVRS

    Offender Details Form

    Traffic report addition

    System

    Offender

    Policeman

    Vehicle number

    License number

    Fault

    Traffic policeman

    Commander

    Violation

    ID

    Password

    Police headquarters

    Shutdown

    Date

    Speed

    Traffic Violation

    Clerk

  • 29

    . #

    Traffic report

    Supervisor

    Report lookup

    Confirmation

    TVRS

    Offender Details Form

    Traffic report addition

    System

    Offender

    Policeman

    Vehicle number

    License number

    Fault

    Traffic policeman

    Commander

    Violation

    ID

    Password

    Police headquarters

    Shutdown

    Date

    Speed

    Traffic Violation

    Clerk Clerk danSupervisorDigantidengan User

    . # & %

    Traffic report

    User

    Report lookup

    Confirmation

    TVRS

    Offender Details Form

    Traffic report addition

    Offender

    Policeman

    Vehicle number

    License number

    Traffic policeman

    Commander

    Violation

    ID

    Password

    Police headquarters

    Shutdown

    Date

    Speed

  • 30

    . # & %

    Traffic report

    User

    Report lookup

    Confirmation

    TVRS

    Offender Details Form

    Traffic report addition

    Offender

    Policeman

    Vehicle number

    License number

    Traffic policeman

    Commander

    Violation

    ID

    Password

    Police headquarters

    Shutdown

    Date

    Speed

    .

    Traffic report

    User

    Report lookup

    Confirmation

    TVRS

    Offender Details Form

    Traffic report addition

    Offender

    Policeman

    Vehicle number

    License number

    Traffic policeman

    Commander

    Violation

    ID

    Password

    Shutdown

    Date

    Speed

  • 31

    .

    Traffic report

    User

    Report lookup

    Confirmation

    TVRS

    Offender Details Form

    Traffic report addition

    Offender

    Policeman

    Vehicle number

    License number

    Traffic policeman

    Commander

    Violation

    ID

    Password

    Shutdown

    Date

    Speed

    .

    Traffic report

    User

    Confirmation

    TVRS

    Offender Details Form

    Offender

    Policeman

    Traffic policeman

    Violation

  • 32

    .

    Traffic report

    User

    Confirmation

    TVRS

    Offender Details Form

    Offender

    Policeman

    Traffic policeman

    Violation

    ? %

  • 33

    # - &

    9 #

    ) % # 9

    0 # + ! #&) G

    ) % #&) G 888

    database proxy merupakan API level tinggi danmembungkuskomunikasi danbahasapemrogramansecaradetail

    # #

    ! ! 9 0

    9 9 0 9 0

    ! 9 0 % 0

    888

  • 34

    # /

    id : longname : Stringrank : int

    Policeman

    TrafficPoliceman id : longdescription : String

    TrafficReport

    id : longdescription : String

    Violation

    name : Stringid : long

    Offender

    1..* 1

    reports of

    1..*

    issues1 *

    occuredAt : Date

    # //

    Violation

    EditReportController

    Traf f icReport

    Of fender Traf f icPoliceman

    Clerk

    ReportDetailsForm

    Conf irmationDialog

    PolicemanDBProxy

    Of fendersDBProxy

    Of fendersDB

    PolicemenDB

    1

    1 1

    1

    1

  • 35

    #

    % B

    9 ! % 0 ! %

    ) % 0 %

    #

  • 36

    0 ! 3 3 ! 3 !

    0 ! % ( 0 3 ) ! ) % ) 3 3 3 , ! ! 8

    # 0 , !

    #

    9 - E >% , %

    % , E ! % % E %

    ! % ! %

    % . / ! . 0 0 ! ! ,

    " / / 0 !

    &

  • 37

    # #

    Window { abstract, author=Joe, status=tested}

    +size: Area = (100,100)#visibility: Boolean = invisible+default-size: Rectangle#max-size: Rectangle-xptr : XWindow

    +display()+hide()+create()-attachXWindow(xsin:Xwindow)

    What do +, #, What do +, #, -- Represent?Represent?

    + Public+ Public# Protected# Protected

    -- Pr ivatePr ivate

    Window

    +size: Area = (100,100)+default-size: Rectangle

    +display()+hide()+create()

    ProvidingProvidingSpecialized ViewsSpecialized Views

    1 # $

    I t em

    NonPI t em Per i shI t em

    Del i I t em Pr oduceI t emDi ar y I t em

    Cus t omer

    Gr ocer yOr der

    1

    *

    Del i Or der

    1

    *

    cont ai ns

  • 38

    # $

    # $ % &

  • 39

    # " # $1

    PharmacyDB

    AddRxRecFillRxRefillRxDeleteRxRec

    MedicationMedicationNameConflictInfoCheckForConflictUpdateConflictInfo

    1

    RxRxNumPhysicanNamePatientNameMedicationNameDosageNumDosesNumRefillsRefillsLeftWriteRx

    PatientRecPatientNamePatientSSNDateOfBirthInsurerPolicyNumetc...UpdateRecetc...

    MedicalHistoryMedicationHistoryKnownAllergiesImmunizationsPregnancyDataetc...

    1n

    n

    n

    1

    #

    !

  • 40

    #

    #

    # %

    ) % ! ! % ! ! ! ! ) # ! % ! ! ) %

    ! ) % ) , "

    "

    !

    ? 3 ! ! ! ! % ! !

  • 41

    #

    &

    ? ! !

    ! ! # ! !

    ? , - $ !

    # 3! !

  • 42

    # 0

    #

    &

    $ % !

  • 43

    & ! % C0#

    2

  • 44

    # $

    F % # B +

    / $

    0

    /

    & ! ! & ! ! !

    % ,

    & ! ! ! ! % ! !

  • 45

    /

    ? , ! ! - !

    % " , C ! % ! !

    % ! $! , !

    ! %

    /

    ) ! < 3 ! > % 0 #

    4 ) !

    F % # 4 ) ! !

  • 46

    2

    ) !

    # ! % ! , 3 % 3 3 !

    # 2

    member:LibraryMember

    book:Book:BookCopy

    borrow(book)ok = mayBorrow()

    [ok] borrow(member)setTaken(member)

  • 47

    # 2

    member:LibraryMember

    book:Book:BookCopy

    borrow(book)ok = mayBorrow()

    [ok] borrow(member)setTaken(member)

    X-Axis (objects)

    Y-A

    xis (time)

    ObjectLife Linemessage

    Activation box

    condition

    & ) + -

    - ( % ! ! % %

    " & , ! % ,

    ! ! ! !

    " !

    myBirthdy:Date

  • 48

    $ > !

    ! ! & ! !

    ! # !

    3 % !

    4 / 3M"4 9 ) % ! 0 9 $30+9& 3M"

    ; ,1 ,> 3 ! ! / ,> ! ! ! ,1 ,> ! ! ! ,1 ! " ,1 ! ,> !

    ) ! ! >

    ) ! ! ! = !

    ! !

    ) ! % ! ! ! 3 "

    ! ! ! !

  • 49

    !

    %

    %

    0 #

    &

    3 ! 9 !

    :A :B

    doYouUnder s t and( )

    Pemanggildi-blok

    return (opsional)yes

  • 50

    3

    # ! ! ; ! ,

    ! 3 ? " ! , !

    ! % 3 !

    ! ! ! ! % 3 ok = i sVal i d( )

    &

    + !

    :A :B

    Constructor

    :A

    :B

    Preferred

  • 51

    & + !

    + ! ! ! ! ! %

    ,

    :A :B

    &

    # ! ) !

    , ,

    ! ! !

    ) % ! ! ! " / ! ! ! ,

  • 52

    /

    / ! - NON PQP ) ! , ! 0 -

    $ - RONON NQPQ # !

    [ok] borrow(member)

    /

    0 -

    :Driver

    * [ unt i l f ul l ] i nser t ( )

    :Bus

    Sintak dari ekspresi bukan

    standart

    :CompoundShape :Shape

    * dr aw( )dr aw( )

  • 53

    /

    ! F % ! % ! ! ) !

    ! ; F % !

    ! % ! ! " #

    2

  • 54

    2

    get Vi ol at i on( i d)

    . , 4

    Clerk

    :ViolationsDialog

    :ViolationsController

    :ViolationsDBProxy

    l ookupv i ewBut t on( )

    i d=get I D( )

    v:TrafficViolation

    di spl ay ( v )

    v

    Lookup Traffic Violation

    Bisa mengguna

    kan pseudo code

    DB di-query dan hasilnya dikembalikan sebagai obyek

  • 55

    pr i nt ( doc , c l i ent )

    . , 5

    Client

    :PrintServer :Queue:PrinterProxy

    enqueue( j ob)

    s t at us

    Printing A Document

    j ob=dequeue( )

    [ j ob] pr i nt ( j ob. doc )

    [ j ob] done( s t at us )

    Repeated forever with 1 min interludes

    Obyek Aktif

    2 " #

  • 56

    PharmacyDB

    Rx Medication MedicalHistory

    EnterRxInfo

    CheckForConflictGetMedHistory

    ConflictResults

    PerformConflictChk

    RxRecord

    2 " #

    2

  • 57

    2

    #

  • 58

    #

    0 # -! !

    ! "

    #

  • 59

    #

    F % # ! !

    3 0 3! 8

    #