+ All Categories
Home > Documents > 3 Amigos UML_Review

3 Amigos UML_Review

Date post: 09-Apr-2018
Category:
Upload: dkastani7850
View: 214 times
Download: 0 times
Share this document with a friend

of 88

Transcript
  • 8/8/2019 3 Amigos UML_Review

    1/88

    Unified Modeling LanguageUnified Modeling Language

    (UML)(UML)

  • 8/8/2019 3 Amigos UML_Review

    2/88

    UMLUML

    =

    . . .

    , ,

    , -

  • 8/8/2019 3 Amigos UML_Review

    3/88

    UMLUML

    :

    (Unified Modeling

    Language, UML)

    , ,

    , (artifacts) .

    :

    H UML (

    ). ( )

    :

  • 8/8/2019 3 Amigos UML_Review

    4/88

    ? ?

    Computer System

    Business Process

    Order

    Item

    Ship via

    Modeling captures essentialparts of the system.

    Dr. James Rumbaugh

    Visual Modeling ismodelingusing standard graphicalnotations

  • 8/8/2019 3 Amigos UML_Review

    5/88

    , .

    (

    ), ,

    .

    .

    .

  • 8/8/2019 3 Amigos UML_Review

    6/88

    .

    ,

    , ,

    .

    .

    , ,

    .

  • 8/8/2019 3 Amigos UML_Review

    7/88

    .

    .

    .

    , ,

    ,

    ...

    ,

    .

  • 8/8/2019 3 Amigos UML_Review

    8/88

    UMLUML

    UML ,

    .

    .

    .

    .

  • 8/8/2019 3 Amigos UML_Review

    9/88

    UMLUML

    Nov 97 UML approved by the OMG

  • 8/8/2019 3 Amigos UML_Review

    10/88

    PartnersPartners

    Rational Software Corporation

    Hewlett-Packard I-Logix

    IBM

    ICON Computing

    Intellicorp

    MCI Systemhouse Microsoft

    ObjecTime

    Oracle

    Platinum Technology

    Taskon Texas Instruments/Sterling Software

    Unisys

    . . .

    ->

  • 8/8/2019 3 Amigos UML_Review

    11/88

    UML

    , ,

    .

    (actors) -

    .

    .

    .

    .

  • 8/8/2019 3 Amigos UML_Review

    12/88

    ( ) (stick person).

    ,

    , .

    .

    .

  • 8/8/2019 3 Amigos UML_Review

    13/88

    ,

    ,

    . (.. (Faculty) ).

  • 8/8/2019 3 Amigos UML_Review

    14/88

    Withdraw

    Deposit

    Check alance

    C ustomer

    Open Account

    Teller

  • 8/8/2019 3 Amigos UML_Review

    15/88

    ( )

    (),

    .

    UML , (

    / )

    .

  • 8/8/2019 3 Amigos UML_Review

    16/88

    -

    (

    context)

    >

    ( )

    >

    .

  • 8/8/2019 3 Amigos UML_Review

    17/88

    Place O rder

    base use case

    Request Catalog

    Order ProductS upply Cus tom er Data A rrange paym ent

    >

    inc lusion use cases

    extension use c ase

    P ay Cas h A rrange Credit

    parent use cas e

    chi ld use cases

  • 8/8/2019 3 Amigos UML_Review

    18/88

    a.

    b. -

    c.

    .

    d.

    (.. )

    e. -

    .

  • 8/8/2019 3 Amigos UML_Review

    19/88

    --

    ( )

  • 8/8/2019 3 Amigos UML_Review

    20/88

    --

    a.

    .

    b. -

    Internet browser

    .

    c.

    ( )

    .

    ,

    , ( ) .

    .

    . email

  • 8/8/2019 3 Amigos UML_Review

    21/88

    --

    d.

    .

    .

    .

    .

    e. - ,

    ., .

  • 8/8/2019 3 Amigos UML_Review

    22/88

    UML

    ( + )

    ,

  • 8/8/2019 3 Amigos UML_Review

    23/88

    (abstract)

    -

    -

    - . .

    -

    - : s trin g

    - : s trin g

    - . . : Date

    - : lo at

    - : string

    - : s tring

    - .. : Date

    - : loat = 0

  • 8/8/2019 3 Amigos UML_Review

    24/88

    - : str ing

    - : s tring

    - .. : Da te

    - tot alStuden ts : int

    - : string

    - : s tring

    - .. : Date

    + ()

    + ()

    + ()

    - : string- : s tring

    - .. : Date

    + ( x) :boolean

    + ()

    + ()

    .

    get() set()

    static attribute

  • 8/8/2019 3 Amigos UML_Review

    25/88

    Empl- N me : Stri

    - ID : Integer

    - Salary : Integer

    + printSalary(ID : Integer)+ printName(ID : Integer)

    :

    : = _

  • 8/8/2019 3 Amigos UML_Review

    26/88

    :

    (public) (+), (protected) (#)

    (private) (-).

    -

    ( )

    -

    -

    .

  • 8/8/2019 3 Amigos UML_Review

    27/88

    :

    ( ) : _

    1,2, , n

  • 8/8/2019 3 Amigos UML_Review

    28/88

  • 8/8/2019 3 Amigos UML_Review

    29/88

    (Association)(Association)

    .

    "" :

    .

    .

    (multiplicity)

    .

    .

  • 8/8/2019 3 Amigos UML_Review

    30/88

    (Association)(Association)

    Class 1 Class_

    + + 1

    :

  • 8/8/2019 3 Amigos UML_Review

    31/88

    ** 11

    nn nn (( nn ))

    00....11 ((

    ))

    nn....mm nn mm

    nn,, mm ((....

    22 44 ))

  • 8/8/2019 3 Amigos UML_Review

    32/88

    UMLUML

    11

    1 1

    ,

    11..n

    1..n 1

    ..11

    1 0..1

    0..n0..n

    0..n 0..n

  • 8/8/2019 3 Amigos UML_Review

    33/88

    Department

    Employee

    1

    0..*

    1

    +staff 0..*

    +unit ??

    *1

    **

    *1

    * *

    (

    !!)

    " " "

    ".

  • 8/8/2019 3 Amigos UML_Review

    34/88

    --

    - (Whole part)

    44

    (Aggregation)

    44

    (Composition)

    -

  • 8/8/2019 3 Amigos UML_Review

    35/88

    --

    3..*

    0..1

    3..*

    0..1

    1

    0..1

    1

    0..1

    - 1

    *

    1

    *

    1

    **

    1

    "" ,

    ,

    .

    "" ,

    .

    ,

    .

  • 8/8/2019 3 Amigos UML_Review

    36/88

    UMLUML

    0..n

    0..n

    -

    nn nn

  • 8/8/2019 3 Amigos UML_Review

    37/88

    .

    (

    , )

    .

    - : s t ring

    - : s tr ing

    + ()

    - / : d o u b le

    - / : do u b le

    - / : do u b le

    - bon us : do uble

  • 8/8/2019 3 Amigos UML_Review

    38/88

    (substitutability principle) .

    , ""

    " ", ""

    .

    , ,

    . ,

    ( ) ,

    .

    ,

    .

    ()

    .

  • 8/8/2019 3 Amigos UML_Review

    39/88

    ,

    . .

    - : In t eger

    + ()

    - . : tring

    + ()

    .

    - : tring

  • 8/8/2019 3 Amigos UML_Review

    40/88

    UMLUML

    ,

    0..10..1

    0..10..1

    ,

  • 8/8/2019 3 Amigos UML_Review

    41/88

    (Constraints)(Constraints)

    ( Boole)

    .

    UML

    ( { } ).

    , UML

    (Object Constraint Language - OCL).

    *1 *1-

    *** *-

    {}

    -

    + (){ . 65 }

  • 8/8/2019 3 Amigos UML_Review

    42/88

    ,

    .

    :

    ,

    . ,

    ;

    -

    .

    -

    .

  • 8/8/2019 3 Amigos UML_Review

    43/88

    ,

    .

    UML,

    ,

    (association class), :

    **

    * *

    - : int

  • 8/8/2019 3 Amigos UML_Review

    44/88

    ,

    ,

    .

    --

    ,

    -- ,

    ''

    .

    - : in

    *1

    *1

    *1

    *1

  • 8/8/2019 3 Amigos UML_Review

    45/88

    -- 1*

    * 1

    - : fl at

    , ,

    - : fl t1* 1*

    - :

    ,

  • 8/8/2019 3 Amigos UML_Review

    46/88

    :

    n

    n

  • 8/8/2019 3 Amigos UML_Review

    47/88

    2 2

    :

    0..111 0 ..1

    getName( )

  • 8/8/2019 3 Amigos UML_Review

    48/88

    , ,

    .

    ,

    ;

    get

    .

    , ,

    .

  • 8/8/2019 3 Amigos UML_Review

    49/88

    ?

    .

    !

    ?

    .

    !

    !

    ?

    Smith

    .

    Smith

    ?

    Jones

    Smith

    Jones

    XXX

    zzz

    .

  • 8/8/2019 3 Amigos UML_Review

    50/88

    ,

    -

    -

    -

    -

    -

    - 1

    *

    1

    *

    >

    -

    -

    - .n1 n1

    >

    *

    *

    <

    *

    *

    + : + :

    -- : : ((

    2 ) 2 )

  • 8/8/2019 3 Amigos UML_Review

    51/88

    1..*

    1

    1..*

    1

    1..*

    1

    1..*

    1

    1..*

    ..1

    R&D

    1..*..1

    ..*

    +

    0..1 1..* 0..*1..*

    0..1

    , .

    () ).

    ?

  • 8/8/2019 3 Amigos UML_Review

    52/88

    UMLUML

    ,

    ,

    .

    .

    :

    : ,

    . :

    :

    :

    :

    .

  • 8/8/2019 3 Amigos UML_Review

    53/88

    n1

    n1

    ?

    ,

    FFAFFFAF FDE5FDE5

    - : *

    - [ ] : *

    FA5FFA5F

  • 8/8/2019 3 Amigos UML_Review

    54/88

    :

    ()

    / ? ? ?/ ? ? ?

  • 8/8/2019 3 Amigos UML_Review

    55/88

    ,

    . UML

    ,

    .

    ,

    ,

    ( ) .

    . (

    )

  • 8/8/2019 3 Amigos UML_Review

    56/88

    .

    .

    (interaction).

    ,

    .

    .

  • 8/8/2019 3 Amigos UML_Review

    57/88

    ( (Sequence Diagrams)Sequence Diagrams) ******

    , :-

    - .

    (lifeline).

    ,

    .

    . (

    ).

  • 8/8/2019 3 Amigos UML_Review

    58/88

    ,

    , .

    -,

    , (

    )

    ( )

  • 8/8/2019 3 Amigos UML_Review

    59/88

    ( (Sequence Diagrams)Sequence Diagrams) ******

    : t r: Ki k : rv r : r it rvi

    1: i r t r (cust r)

    2: ick t (dat )

    : ff r (seat ice )

    4: se lect (seats)

    5: subm i t ( order)6: char e(customer, amou t)

    7: c o fi rm at io8: K

    9: r i t ( order)

  • 8/8/2019 3 Amigos UML_Review

    60/88

    F red : tudentFred :

    :

    Fred :

    Fred :

    OBJ101 :

    1:

    2:

    3:

    4:

    5:

    6:

    7:

    8:

    9:

    10:

    11:

  • 8/8/2019 3 Amigos UML_Review

    61/88

    . alpha,

    . (Joe kicked the ball !)

    ,

    ,

    .

    ,

    , .

    , ,

  • 8/8/2019 3 Amigos UML_Review

    62/88

    o,

    .

    :

    (click mouse) ( email)

    ( .)

  • 8/8/2019 3 Amigos UML_Review

    63/88

    :

    class Professor {

    public:

    addStudent(Student* s)

    { s supervisedStudents;}

    private:

    std::list supervisedStudents;

    };

    ProfessoraddStudent (&Joe) Joe

  • 8/8/2019 3 Amigos UML_Review

    64/88

    :

    ()

    class Section {

    public:

    addStudent(Student* s)

    { course; }

    private:

    Course* course;

    };

    ProfessoraddStudent (Joe) Math101enrollStudent (Joe)

    delegation ( )

    o

  • 8/8/2019 3 Amigos UML_Review

    65/88

    :

    class Section {

    public:

    whatIsTheCapacity()

    { capacity; }

    private:

    Course* course;

    int capacity;

    };

    Section1whatIsTheCapacity ( )

    get

    2525

  • 8/8/2019 3 Amigos UML_Review

    66/88

    :

    , ,

    ()

  • 8/8/2019 3 Amigos UML_Review

    67/88

    (

    ) , .

    ,

    .

    ,

    ,

    . ,

  • 8/8/2019 3 Amigos UML_Review

    68/88

    . .

    -

    ,

    - -

    :

    .

    ()

    /

    .

    ,

    . .

    UMLUML

  • 8/8/2019 3 Amigos UML_Review

    69/88

    UMLUML

    .

    Sa le s : ep artm e t

    .

    ( )

    .

    Sa les :

    ep artm e

    t

    .

    . Department

    getCustomer( ).

    ,

    .

    ,

    .

    Bob :

    Employee

    Sales :

    Department

    1: getCustomer()

    UMLUML

  • 8/8/2019 3 Amigos UML_Review

    70/88

    UMLUML

    . ( )

    -

    .

    PayForm :

    Form

    3: HighlightAmount()

    . ,

    .

    A c counting :

    Departm ent

    B o :

    E m ploy ee

    1: c reate()

    (Collaboration Diagrams)(Collaboration Diagrams)

  • 8/8/2019 3 Amigos UML_Review

    71/88

    (Collaboration Diagrams)(Collaboration Diagrams)

    ,

    .

    ,

    .

    (

    )

    .

    (

    ).

    (Collaboration Diagrams)(Collaboration Diagrams)

  • 8/8/2019 3 Amigos UML_Review

    72/88

    (Collaboration Diagrams)(Collaboration Diagrams)

    :

    : actor

    : K iosk

    : Server : CreditService

    1: insertCard (c ustomer)

    2: pickDate (date)

    3: offer (seatChoice)

    4: select (seats)

    5: subm it (order)

    6: charge (customer, amount)

    7: confirmat ion

    8: OK

    9: print (order)

  • 8/8/2019 3 Amigos UML_Review

    73/88

    Fred :

    Fred : Student

    Fred :

    Fred

    :

    OBJ10 1 :

    1:

    4:

    5:

    6: 7:

    8:

    9:

    10 :

    11 :

    :

    2: 3:

  • 8/8/2019 3 Amigos UML_Review

    74/88

    /

    . (control flow)

    (flowcharts)

    (Activity Diagrams)(Activity Diagrams)

  • 8/8/2019 3 Amigos UML_Review

    75/88

    (Activity Diagrams)(Activity Diagrams)

    , (Bohm & Jacopini).

    .

    .

    ()

    .

    (join)

    (fork)

    .

    (Activity Diagrams)(Activity Diagrams)

  • 8/8/2019 3 Amigos UML_Review

    76/88

    (Activity Diagrams)(Activity Diagrams)

    (UML)

    Activity

    (Activity Diagrams)(Activity Diagrams)

  • 8/8/2019 3 Amigos UML_Review

    77/88

    (Activity Diagrams)(Activity Diagrams)

    set order

    assig

    seats

    assig seats

    charge

    credit card

    debit

    account

    award

    bonus

    mail p acket

    [single order

    [subscrip t ion

    ( (Swimlanes)Swimlanes)

  • 8/8/2019 3 Amigos UML_Review

    78/88

    ( (Swimlanes)Swimlanes)

  • 8/8/2019 3 Amigos UML_Review

    79/88

    (state machine view)

    ,

    .

    .

    , ( )

    ,

    .

    . ,

    .

    ( (Events)Events)

  • 8/8/2019 3 Amigos UML_Review

    80/88

    ( (Events)Events)

    , . ,

    .

    ,

    .

    .

    :

    ( (Events)Events)

  • 8/8/2019 3 Amigos UML_Review

    81/88

    ( (Events)Events)

    -:

    . .

    :

    .

    , ,

    .

    . .

    .

    ( (Events)Events)

  • 8/8/2019 3 Amigos UML_Review

    82/88

    ( (Events)Events)

    Inp utEvent

    - t im e

  • 8/8/2019 3 Amigos UML_Review

    83/88

    ( (Events)Events)

    -:

    .

    (

    ). -:

    .

    (, ) (

    ).

  • 8/8/2019 3 Amigos UML_Review

    84/88

    .

    . :

    ,

    ,

    .

    ,

    .

    .

  • 8/8/2019 3 Amigos UML_Review

    85/88

    W a it ing

    ConfirmPIN

    ProcessCommands

    Cance l

    rece ive PIN

    reject

    approve / find acc ount()

    acc ount found[ inact ive ac c ount ]

  • 8/8/2019 3 Amigos UML_Review

    86/88

    Enter assword

    entr / password.res et()

    ex i t/ se t echonorm alevent di it/ handlecharac ter

    event c lear/password.res et()/

    event help/display help/

    s tatenam e

    ent ry & ex i t act ions

    internal t rans it ions

    "" .

    .

    ,

  • 8/8/2019 3 Amigos UML_Review

    87/88

    (component diagrams)

    (, , , .dll) ...

  • 8/8/2019 3 Amigos UML_Review

    88/88

    (deployment diagrams)

    -

    (node)

    Weberver

    Databaseerver

    Client

    rinter

    Flight erver

    Internet

    Browser

    DBMS

    so tware

    Backup

    download_nightly

    S-232

    Ethernet

    TCP/IP


Recommended