--- tags: 軟體工程 title: 第八週 --- ![](https://i.imgur.com/B1qWmVx.png) - story - 需求、功能 - criteria - 提出的條件 - **use case** > an activity that the system performs, usually in response to a request by a user - Use cases define functional requirements - 其實就是功能 - Analysts decompose(切成) the system into a set of use cases (functional decomposition(切割) - 把大系統切成子系統 - 把大的程式切成好幾個function - Two techniques for Identifying use cases - User goal technique - Event decomposition technique - Name each use case using Verb-Noun --- ## User Goal Technique ![](https://i.imgur.com/dBr7Fqy.png) <center>以RMO CSMS為例</center> - 依服務、功能來區分類別 - 使用動詞加名詞來敘述功能 --- ## Event Decomposition Technique - More Comprehensive(完整) and Complete Technique - Identify the events that occur to which the system must respond. - For each event, name a use case (verb-noun) that describes what the system does when the event occurs - Event > something that occurs at a specific time and place, can be described(描述), and should be remembered by the system --- ![](https://i.imgur.com/o537gSB.png) <center>雲狀圖</center> - 雲內指系統內,雲外指系統外 - 人表示 extrernal event - 鬧鐘表示 temporal event - External Event - an event that occurs outside the system, usually initiated by an external agent or actor - 發生在系統外,常被外部事件觸發 - Temporal Event - an event that occurs as a result of reaching a point in time - 跟時間有關的event - 時間到了,某個件事情會發生 - State Event - an event that occurs when something happens inside the system that triggers(觸發) some process - reorder point(訂貨點) is reached(到達) for inventory(庫存) item - 當系統某個狀態發生時的event - <font color = red>**每一種event就是一個use case**</font> --- ## External Event Checklist - External agent or actor wants something resulting in a transaction - Customer buys a product - External agent or actor wants some information - Customer wants to know product details - External data changed and needs to be updated - Customer has new address and phone - Management wants some information - Sales manager wants update on production plans --- ## Temporal Event Checklist - Internal outputs needed at points in time - Management reports (summary or exception) - Operational reports (detailed transactions) - Internal statements and documents (including payroll) - External outputs needed at points of time - Statements, status reports, bills, reminders --- - Finding the actual event that affects the system - 找到的event要把非系統的event刪除 - Tracing a sequence of transactions resulting in many events - Don’t worry about functions built into system because of limits in technology and people. Wait until design - 假設所有跟人或技術的問題都不存在 --- - 分析目的 - 搞清楚人家要什麼 - 需求 - 包含功能需求、非功能需求 - 不去管用什麼技術去實現 - what - 設計目的 - 解決分析出來需求 - 要使用的技術 - 藍圖 - how