【文章內(nèi)容簡介】
idCubeCollaboration Diagram A diagram that shows interactions anized around the structure of a model, using either classifiers and associations or instances and links. Unlike a sequence diagram, a collaboration diagram shows the relationships among the instances. Sequence diagrams and collaboration diagrams express similar information, but show it in different ways. 協(xié)作圖元素 ? Object ? Class instance : Registrar : CloseRegistrati... : MainForm : ICourseCatalogS... : CloseRegistrationContro... : CourseOffering : Schedule8: get number of students10: set status as closed1: select close registration4: close registration3: is registration open?5: close registration2: open7: close registration6: get course offerings9: mit offering完成課程登記 State Diagram State: A condition or situation during the life of an object during which it satisfies some condition, performs some activity, or waits for some event. 登登登entry/ 登登登登do/ 登登登登登登登do/ 登登登登登登do/ 登登登登登登登登登登登登登登登登entry/ 登登登登do/ 登登登登登登登登entry/ 登登登登exit/ 登登登登H登登do/ 登登30登登登登登[ count=2 ][ count=4 ] / set count=0Quit登登登登登登登登登登登登選課 History ? The history icon provides a mechanism to return to the most recently visited state or activity when transitioning directly to a state or activity with substates. History applies to the given level in which it appears. 登登登登登登登登登登登登登entry/ 登登登登exit/ 登登登登登登登登do/ 登登登登登登登登登登登登登登登登登登登登( 登登 )登登登登登登登登[ 登登登3 ]登登登登[ 登登登=3 ][ 登登登=10 ] ^登登登登( 登登 ) / 登登登登登登0Activity Diagram ? An activity is an ongoing nonatomic (in other words, interruptible) execution within a state machine. ? An activity graph is a state machine in which most or all of the states are action states or activity states, and in which most or all of the transitions are triggered by pletion of activity in the source states. ? An activity graph emphasizes the sequential and concurrent steps of a putational procedure or a workflow. 用途 An activity graph is a variation of a state machine in which the states represent the performance of actions or subactivities and the transitions are triggered by the pletion of the actions or subactivities. It represents a state machine of a procedure itself. ? 描述業(yè)務(wù)模型( Use Case分析) ? 描述類動(dòng)態(tài)模型(類設(shè)計(jì)) 活動(dòng)圖與狀態(tài)圖比較 ? An activity diagram is a special case of a state diagram in which all (or at least most) of the states are action or subactivity states and in which all (or at least most) of the transitions are triggered by pletion of the actions or subactivities in the source states. ? The entire activity diagram is attached (through the model) to a class, such as a use case, or to a package, or to the implementation of an operation. The purpose of this diagram is to focus on flows driven by internal processing (as opposed to external events). ? Use activity diagrams in situations where all or most of the events represent the pletion of internallygenerated actions (that is, procedural flow of control). ? Use ordinary state diagrams in situations where asynchronous events occur. Action state ? An action state is a shorthand for a state with an entry action and at least one outgoing transition involving the implicit event of pleting the entry action (there may be several such transitions if they have guard conditions). ? Action states should not have internal transitions or outgoing transitions based on explicit events, use normal states for this situation. ? The normal use of an action state is to model a step in the execution of an algorithm (a procedure) or a workflow process. Action State ActivityStateActivity state ? A subactivity state invokes an activity graph. When a subactivity state is entered, the activity graph “nested” in it is executed as any activity graph would be. The subactivity state is not exited until the final state of the nested graph is reached, or when trigger events occur on transitions ing out of the subactivity state. ? Since states in activity graphs do not normally have trigger events, subactivity states are normally exited when their nested graph is finished. ? A single activity graph may be invoked by many subactivity states. ActionObject Flow ? Actions operate by and on objects. These objects either have primary responsibility for ? initiating an action, or are used or determined by the action. Actions usually specify calls sent ? between the object owning the activity graph, which initiates actions, and the objects that are ? the targets of the actions. 舉例 1)選課程計(jì)劃 2)戶籍管理 3)喝咖啡 Component Diagram A physical, replaceable part of a system that packages implementation and conforms to and provides the realization of a set of interfaces. A ponent represents a physical piece of implementation of a system, including software code (source, binary or executable) or equivalents such as scripts or mand files. ponent ? a software module (source code, binary code, executable, DLL, etc.) with a welldefined interface. NewComponentCompo stereotypes ? Main programs,主程序 ? Packages,構(gòu)件包 ? Subprograms,子程序 ? Tasks,獨(dú)立線程 ? EXE,可執(zhí)行文件 ? DLL,動(dòng)態(tài)連接庫 任務(wù) NewTaskSpec NewTaskBody獨(dú)立線程。 子程序 ? 不含類聲明。 NewSubprogSpec2 NewSubprogBodyNewGenericSubprog動(dòng)態(tài)鏈接庫 NewPackageSpec NewPackageBody主程序 NewMainSubprog構(gòu)件包 ? 子系統(tǒng) NewPackageSpec NewPackageBodyNewGenericPackage構(gòu)件依賴關(guān)系 ? 軟件模塊的編譯和運(yùn)行時(shí)關(guān)系。 ? client ponent can inherit from, contain instances of, use, and otherwise depend on classes that are exported from the supplier ponent. ? You can draw a dependency relationship from a ponent to an interface of another ponent, which means that the client ponent uses the operations of the other p