Click here to load reader

UML 统一建模语言

  • Upload
    cheng

  • View
    158

  • Download
    7

Embed Size (px)

DESCRIPTION

UML 统一建模语言. 第六章. 概 述. 软件工程领域在 1995 年至 1997 年取得了前所未有的进展 , 其成果超过软件工程领域 1995 年之前 15 年的成就总和。其中最重要的、具有划时代重大意义的成果之一就是统一建模语言 — UML ( Unified Modeling Language) 的出现。在世界范围内 , 至少在近 10 年内, UML 将是面向对象技术领域内占主导地位的标准建模语言。. 6.1 UML 概述. UML ( Unified Modeling Language ) 是软件界第 一个统一的建模语言, 该方法结合了 Booch, OMT, - PowerPoint PPT Presentation

Citation preview

  • UML

  • 19951997,199515 UML ( Unified Modeling Language),10UML

  • 6.1 UML UMLUnified Modeling LanguageBooch, OMT, OOSE ,(General) UML UMLBusiness Modeling,

  • 1.

  • 2. UML:

  • 199410Jim RumbaughGrady BoochOMTBooch1995Unified Method0.8Ivar Jacobson(User case),19960.919971UML1.0OMG(Object Management Group)UMLIBM,Mircrosoft,HP.19971176.1.1 UML

  • UML

  • 6.1.2 UML UMLUMLUML(1) UML UML(meta-model)UML,,UML UML(2) UMLUML, ,UML

  • UML: (views), (Diagrams), (Model elements) (general mechanism)UML

  • UML,viewDiagramsGraph,(views)

  • Use case ViewImplementation View Design View ()()Process View Deployment View UML

  • UML9(Use case diagram) ,(Static diagram),(Behavior diagram) (Interactive diagram), ( Implementation diagram ) (Diagrams)

  • (general mechanism) (Extensibility mechanisms) (Stereotype)(Tagged value)(Constraint).UML(Model elements)

  • (1) UMLBoochOMTOOSEOMG(2) UML, (3) UML(4) UML6.1.3 UML

  • 6.2 UMLUML1. UML2. , > UML40>

  • 6.2.1

  • connect(link) associationgeneralization(dependency)(aggregation)

  • associationlink)6.2.2 (binary)(ternary)(higher order)a b

  • 5.2.3 (multiplicity) 0..1 1 0..** 1..* 1 1,3,7 1371 {ordered} ()(navigation)

  • (qualified association) ,

  • 6.2.4 UMLconstraint {constraint},

  • 1. complete: 2. disjoint: 3. incomplete: 4. overlapping:

  • xor 1.implicit:, 2.ordered: 3.changeable:(Link) 4.addonly: 5.frozen:, 6.xor:

  • AB A B6.2.6 (varieties)

  • (varieties) (abstraction) (binding) (combination) (permission) (usage)() (trace) (access) (call)

  • (derive) (friend) (import) (instantiation) (parameter) (realize) (refine) (send)

  • ABBABA,6.2.7 6.2.8 UML

  • 6.3 1992JacobsonUse case Use caseOOSEIT UML!!

  • 6.3.1

  • 6.3.2 (Use case model) (Actor) ,, UML UML,

  • (Actor),, 1()?23456)1

  • 12//341

  • :,

  • 6.3.31 Use case 1. 2. 3.

  • 1. () 2. 3. Use case ,Use case

    (,)

  • 1 PRMS Use CaseUse Case

  • 1 PRMS

  • 2

  • 1. 2. 3. 4. 2

  • 1. 2. 3. 4. 5. 6.

  • 1. (1)(2)(3)(4)(5)(6),,(2)

  • . //

  • 1. : a b c d 2. : e f g h

  • 3. i4. j k l m 5. n o

  • 1.2. 3.4. : ()3,1,2. 12-30/

  • ,UMLUML,,UML (Use case diagram) (Class diagram) (Object diagram ) (Package diagram) (Component diagram) (Deployment diagram)6.4

  • 6.4.1 UML(Class Diagram)(Object Diagram) (Class diagram) Char,Boolean,Double,Float, Integer, Object,Short,String (instance),

  • (1)(attribute) visibility attribute-name : type = initial-value {property-string} (visibility) public+ private- protected#

  • (2) visibility operating-name(parameter-list): return-type {property- string} {} Parameter-name :type =default-value

  • 1. 2. 3. 4.

  • .

  • .

  • .

  • .

  • 1

  • 3. ;????

  • UML(association) ,(aggregation) ,(generalization) , (depending) (refinement) ,1. 2. 3. 4. 5. 6. 6.4.2 UML

  • 7 (Recursive association)

  • (aggregation) -1(shared aggregation) 1(composition aggregation) (01)

  • {abstract} (overlapping)(disjoint) {complete} {incomplete}.

  • ATM(Auto Trade Machine)ATM

  • ()

  • 11

  • 1. 2. 3.

  • 1. 2. 3. 4. 2

  • 2

  • ,:

  • (1) () ()(),

  • (Refinement),,;,;,

    1. (Conceptual)2. (Specification),3. (Implementation),

  • 6.4.3 . , subsystem 1.(Package)

  • ,, ,,

  • UML(private)(public)(protected)

  • :AWTJavaGUI

  • 6.59.5

  • (state diagram) (activity diagram) (sequence diagram) (collaboration diagram) 9.54

  • UML(simple)(synchronous)(asynchronous)

  • (State Diagram),,:6.5.1 ,:

  • ([])/ 3 entry exit do

  • login login loginlogin time=curent timeentry/type logindo/get use namedo/get passwordhelp/display helpexit/login(use_name.password)

  • ,

  • UML

  • UML41.2. (signal) 3..

  • 6.5.2 (Sequence Diagram),

  • ,,

  • ABCDE{B-A
  • (destroying)

  • (Activity Diagram),(),, , ()6.5.3

  • .

  • 2.

  • 3. ,

  • . .

  • . aPrinter:PrinterPrint(file)Print(file)PSCustomerWindow.PrintAllCustomers()

  • (Collaboration Diagram),(Link),,6.5.4

  • ,{new},,{destroy}1. {new}{destroy}

  • 2. (Link),(Composition Link)(Aggregation Link)(Qualified Link)(Navigation Link),global()local()parameter()self()

  • . = ,1.11.21.3 1.1.1a1.1.1b

  • r0r1

  • . .

  • 6.6 (Component diagram) (Deployment diagram) .

  • component,, 1)(Source Component) WEB 2)(Binary Component) 3)(Executable Component) ;6.6.1

  • 6.6.1 1. 2. 3.

  • (Development time Dependency) (Call Dependency)

  • 6.6.2

    :,

  • (C/S)

  • 6.7 RUP RUPRational Unified ProcessRational SoftwareJAVA J2EE RUP

  • 6.7.1 UMLRUPUMLUML

  • UML. , 2. ,UML 3. UML4.

  • UML :RUPOPEN ProcessXPExtreme Programming OOSP(Object_Oriented Software Process). UMLRUPUMLRUP

  • 6.7.2 RUP RUPUML Develop Iteratively Develop Iteratively Manage Requirements (Use Component Architectures) Use Component Architectures Continuously Verify Quality Manage Change :

  • 6.7.3 RUP

  • RUPRUP 1. (Inception) (evaluation) (construction) (Transition) 2. RUPRUP9(Core Workflows)

  • (Business Modeling) (Requirements) (Analysis & Design) (Implementation) (Test) (Deployment) (Configuration & Change Management) (Project Management) (Environment)(Core Process Workflows) (Core Supporting Workflows)RUP

  • RUP RUP

  • MileStone RUP

  • . . . . 2

  • 1. Define Meeting Alter Meeting Remove Meeting . Request Meeting Instance Chang Request Cancel Request Add Attendee Release Room . Request Meeting Instance Modify Request Cancel Request

  • 4. Add Attendee Cancel Request Request Meeting Instance Modify Request 5. Meeting Room Maintenance Set Reservation Tome Limit

  • Use caseUse case

  • 1Define Meeting Alter Meeting Alter Meeting

  • Use caseUse case

  • 1. Meeting2. MeetingInstance, Meeting3. MeetingRoom,4. MeetingAdministration5. Attendee6. GroupAttende7. AddressE-mail8. PostOffic9. AttendeeManagement10. ReservationCriteria11. Information

  • 1. Meeting 2. MeetingInstanceMeetingInstanceMeeting Meeting MeetingInstance

  • 3. MeetingRoom 4. Attendee Attendee

  • 5. GroupAttendee 6. Address Address

  • 7. PostOffice 8. Information PostOfficePostOfficeXXXXX 2006420XXX

    XXX 2006.3.28

  • 9. AttendeeManagement IformationAttendeeManagement

  • Iformation 10. ReservationCriteria() MeetingInstanee MeetingInstaneeReservationCriteria

  • 11. MeetingAdministration IformationDefineMeetingAlterMeeting RemoveMeeting MeetingMeetingAdministration

  • ReservationCriteriaMeetingInstance InformationMeetingRoom1..*1..*1..*PostOffice

    GroupAttendee

    AttendeeManagement

    Address

    PostAddress

    EmailAddress

    Attendee

    1..*0..*1..*0..*110..*0..*0..*111

  • ()

    MeetingAdministrtiona

    Meeting

    MeetingAdministrtionaDefineMeeting(meeting)[IsMeetingExisted=.T.]3:Fail(MeetingExisted)2:{new(meeting)}

  • ()

    MeetingAdministrtiona

    MeetingInstance

    MeetingAdministrator1RemoveMeeting (MeetingName)[IsAllMeetingInstancesCanceled=.F.]5:Fail(MeetingExisted)2:CancelMeetingInstance()

    Meeting

    [IsAllMeetingInstancesCanceled=.T.]4:Fail(MeetingExisted)[IsOpen=.F.]3:Cancel()

    joing,,etingetingatiora