第十三篇作业行为塑模.ppt

  1. 1、本文档共60页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
吳仁和、林信惠 (2004) 第十三章 作業行為塑模 導論 在物件導向系統發展過程中,完成了使用個案(或稱需求)塑模後,接下來便可進行物件資料結構塑模、物件互動行為塑模、作業行為塑模等活動,以開始架構系統。 一般的說法:Behavior Modeling 作業行為塑模主要表達工具 狀態圖:State Machine Diagram (UML 2.x) StateChart Diagram (UML 1.x) 活動圖:Activity Diagram 導論 (續1) 作業行為塑模應該用狀態圖或活動圖或兩者皆用?這問題並無標準答案,應視系統之複雜程度、專案需求、系統分析師之習慣等因素來決定。如前所述,物件導向的分析與設計很難一次就完整的完成,常須經歷反覆的設計,才能漸趨完整或完美,因此作業行為塑模亦須反覆進行,才能有較滿意的成果。 狀態圖 狀態圖是一種塑模工具,它可用於表達一個物件、一個使用個案、多個使用個案間或一個系統在其生命週期中之所有狀態及其轉換關係。(???) A statechart diagram shows a state machine. A state machine is a behavior that specifies the sequences of states an object goes through during its lifetime in response to events, together with its responses to those events. (User’s guide) Some objects are incredibly complicated, so complex that developers can have difficulty understanding them. To understand complex classes better, particularly those that act in different manners depending on their state, you should develop one or more UML 2 state machine diagrams … describing how their instances work. … UML state machine diagrams depict the various states that an object may be in and the transitions between those states. (Agile Modeling) 狀態圖的元件 狀態圖之主要元件包括狀態與轉換,其運作規則是當轉換發生後,物件(或系統)會從某一狀態(稱為來源狀態),進入另一個狀態(稱為目的狀態),如圖13-1。 專題的要求: 請針對你的專題找出至少一個比較複雜的物件,並劃出它的狀態圖。 Objects that must respond to signals, which are asynchronous stimuli communicated between objects. Ex. Cellular phone must respond to random phone calls, keypad events, and to events from the network Objects whose current behavior depends on their post behavior. Ex. The behavior of an air-to-air missile guidance system will depend on its current state, such as NotFlying (it’s not a good idea to launch a missile while it’s attached to an aircraft that’s still sitting on the ground) or Searching (you shouldn’t arm the missile until you have a good idea what it’s going to hit). 圖13-1 狀態與轉換樣板 狀態圖的元件(續) 基本元件 States Events Transitions 一個狀態是一個物件在其生命週期中,某一時間點之一個條件或情況,在此狀態中,它滿足某條件,執行某活動或等待某事件。 A state is a condition or situation during the

文档评论(0)

xina171127 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档