tuongtac

Upload: doi-thay

Post on 03-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Tuongtac

    1/17

    An Overview of the UML

  • 7/29/2019 Tuongtac

    2/17

    2

    Ni dung

    Tng tc Cc lc tng tc

    Sequence diagram

    Collaboration diagram

    Bi tp

  • 7/29/2019 Tuongtac

    3/17

    3

    S tng tc

    Mt tp cc thng ip chuyn i gia mt tp cci tng thi hnh mt mc ch c th Ng cnh

    Cc i tng c lin kt vi cc i tng khc

    S cng tc ca cc i tng trong h thng hay h thngcon Gia cc i tng trong bn ci t ca mt hm

    Cc tham s Cc bin cc b Cc bin ton cc

    Tham gia trong mt tng tc Cc i tng Cc vai tr Person Companyemployee employer

    *1..*

  • 7/29/2019 Tuongtac

    4/17

    4

    S tng tc (tt.)

    Link Mt kt ni ng ngha gia 2 i tng

    C mt link gia 2 i tng, mt i tng c th gi mtthng ip n i tng kia

    Thng ip c t ca mt giao tip gia 2 i tng

    p: Person : Company

    Assign (development)

    link

    message

  • 7/29/2019 Tuongtac

    5/17

    5

    Sequence Diagram

    Biu din mt tng tc nhn mnh trnh t thi gianca cc thng ip M hnh ho lung ca tin trnh

    M t mt kch bn(scenario) c th

    Thng cha Object (lifeline)

    S tn ti ca mt object ti mt thi im c th

    Thng ip Mt s giao tip ca cc object din ra trong lung thng tin

    Lung iu khin (Focus of control) Khong thi gian m mt object ang thi hnh mt hnh ng

  • 7/29/2019 Tuongtac

    6/17

    6

    Sequence Diagram (tt.)

    1: PerformResponsibility

    Client Object Supplier Object

    Message

    :Client :Supplier

    Focus of Control

    Reflexive Message

    Object Lifeline

    1.1: PerformAnother

    Responsibility

    Hierarchical Message

    Numbering

  • 7/29/2019 Tuongtac

    7/177

    Sequence Diagram (tt.)

    : Student: RegisterForCoursesForm : RegistrationController : Course Catalog: CourseCatalogSystem

    A list of the available

    course offerings for this

    semester are displayed

    Student wishes to

    create a new

    schedule

    1. // create schedule( )

    1.2. // display course offerings( )

    1.1. // get course offerings( )

    1.1.1. // get course offerings(forSemester)

    1.3. // display blank schedule( )A blank schedule

    is displayed for the

    students to select

    offerings

    1.1.1.1. // get course offerings( )

  • 7/29/2019 Tuongtac

    8/178

    Collaboration Diagram

    Nhn mnh vo trt t khng gian ca cc i tngtham gia vo tng tc M hnh ho lung ca tin trnh

    M t trt t v tr gia cc i tng v x l

    Thng cha Object

    Message

    Link

    Mt quan h gia cc i tng qua thng ip c th c gi C th l mt c th ha ca mt s kt hp

  • 7/29/2019 Tuongtac

    9/179

    Collaboration Diagram (tt.)

    1: PerformResponsibility

    Client Object

    Supplier Object

    Message

    Link

    :Client

    :Supplier

  • 7/29/2019 Tuongtac

    10/1710

    Collaboration Diagram (tt.)

    : Student

    : RegisterForCoursesForm

    : RegistrationController : CourseCatalogSystem

    1.2. // display course offerings( )1.3. // display blank schedule( )

    : Course Catalog

    1. // create schedule( )

    1.1. // get course offerings( )

    1.1.1. // get course offerings(forSemester)

    1.1.1.1. // get course offerings( )

  • 7/29/2019 Tuongtac

    11/1711

    Bi tp - Login

    Use-case ny m t cch mt ngi dng ng nhp vo hthng

    Lung s kin chnh (Basic flow) This use case starts when the actor wishes to log into the system

    The system requests that the actor enter his/her name & pwd

    The actor enters his/her name and pwd

    The system validates the entered name & pwd

    The system logs the actor into the system

    Lung s kin ph (Alternative flow)

    If in the basic flow, the actor enters an invalid name & pwd, the systemdisplays an error message

    The actor can choose to either return to the beginning of the basic flow or

    canel the login, at which point the use case ends

  • 7/29/2019 Tuongtac

    12/1712

    Bi tp Login (tt.)

    Sequence diagram

    : User: User

    MainFormMainForm LoginFormLoginForm LoginControllor LoginControllor DBUser DBUser

    1. Select Login

    1.1. Show

    2. Submit(usr,pas)

    2.1. Verify(usr,pas)

    2.1.1. GetUserList

    2.1.2. SelfVerify(usr,pas)

    2.1.2.1.

    2.1.2.1.1. show res ult

  • 7/29/2019 Tuongtac

    13/17

    13

    Bi tp Login (cont.)

    Collaboration diagram

    : User

    MainFor

    m

    LoginFor

    m

    LoginCont

    rollor

    DBUser

    1. Select Login

    1.1. Show

    2. Submit(usr,pas)

    2.1. Verify(usr,pas)

    2.1.1. GetUserList

    2.1.2. SelfVerify(usr,pas)

    2.1.2.1.

    2.1.2.1.1. show result

  • 7/29/2019 Tuongtac

    14/17

    14

    Bi tp - Select Payment Method

    This use case allows an employee to select a payment method.The payment method controls how the employee will be paid.

    The employee may choose to:

    Pick up his check directly

    Receive it in the mail

    Have it deposited directly into a specified bank account

    Basic flow

    This use case starts when the employee wishes to select a payment

    method

    The system requests the employee specify the payment method he/she

    would like

    The employee selects the desired payment method

    If the employee selects the pick up method, no additional information isrequired

    If the employee selects the mail method, the system requests employee

    specify the address that the paycheck will be mailed to

  • 7/29/2019 Tuongtac

    15/17

    15

    Bi tp - Select Payment Method

    Basic flow (cont.) If the employee selects the direct deposit method, the system requests

    employee specify the bank name and account number

    Once the employee provides the requested information, the system

    updates the employee information to reflect the chosen payment method

    Alternative flow Employee not found If in the basic flow, information for the employee could not be located, the

    system displays an error massage and the use case ends

  • 7/29/2019 Tuongtac

    16/17

    16

    Bi tp - Select Payment Method

    Sequence diagram

  • 7/29/2019 Tuongtac

    17/17

    17

    Bi tp - Select Payment Method

    Collaboration diagram