# 軟體工程筆記 {%hackmd BJrTq20hE %} ### 評分標準(2021/9/15) - ==討論版發表文章 10%== - Assignments(作業) 10% - ==Labs (工具實習) 10%== - Project(專案) 40% - ==Exams(期中、期末考) 40%== ### 課堂面授 13:15~16:00 ==**11/10 :期中考**== #### Reference book Roger Pressman and Bruce Maxim, Software Engineering: A Practitioner's Approach, 9th Edition, McGraw-Hill, 2020. --- ## Chapter.1 *Introduction to Software Engineering* ### 軟體危機 > 軟體遇到的問題 > > - 無法達成使用者需求 > > - 時常當機 > > - 過於昂貴 > > - 缺乏維護 > > - 遲交 > > - 無法有效率使用資源 ### 開發迷思 > 人月神話 man-month myth (人力分配過於理想) > 錯誤假設 沒有貼近真實體驗 軟體產品 > 也包含設計文件、參考文件和測試的程式 ### 軟體Myths > Once the software is demonstrated, the job is done --- ## Chapter.2 *Software Engineering History and State-of-Art* ### 軟體工業的演進 > 個人軟體程式服務 > > 軟體產品 > > > 企業用軟體 > > > > 套裝軟體 > > > > > 網路軟體與服務 ### 軟體工程遇到的問題 > 遲交、無法完成、成本考量、被取消 ### 軟體這幾年的改變 > 軟體變複雜變大 > 市場給的壓力 ### 現今的軟體工業 > 低品質、遲交、超出預算 > 元件式、異質性 ### 三個挑戰 - 傳統系統 > 舊有系統需要去維護更新 - 異質性 > 軟體不相容 - 交貨時間 > 交貨時間變短 --- ## Chapter 3. *Traditional Software Processes* ### 軟體程序 *Software Process* >訂定規格↘ >>>>>設計軟體↘ >>>>>>>>>驗證軟體↘ >>>>>>>>>>>>>維護軟體 ### 軟體程序模型 *Software Process Model* #### 瀑布式模型 > [color=#a24fd6]階段分明清楚 > > 先後順序明顯 > > Ex. **醫學天文、大型軟體專案(有固定需求)** > > > 缺點: > > > 缺乏彈性->時間可能拖長 #### 演進式開發 > [color=#3494]不同階段交錯 > 去跟客戶溝通需求 (探索式開發) > > 製作sample以確認客戶需求 > > Ex.** 中小型互動介面、使用者介面** > > > 缺點: > > > 不清楚在哪個階段(不透明)、需要去學習樣板語言 #### 元件式開發 > [color=pink]重組已經存在的元素 > 重複使用並整合 #### 增量交付 Incremental delivery > 分期交付專案 ##### 極限編程 Extreme programming > [color=#3317] 把專案分割成最小 > 使用者需要參與 > 兩個人共同開發 一人開發一人檢查 #### 螺旋式開發 Spiral development > [color=#1733] 不斷分析風險 ![](https://i.imgur.com/kEkVxyY.png) 四階段 - Objective setting > 確定該階段具體目標 - Risk assessment and reduction > 風險分析與評估 - Development and validation > 開發與驗證 - Planning > 計畫 --- ## Chapter 4. *Contemporary Software Processes* ### Rational Unified Process > 源自於 UML 和相關流程工作的現代流程模型 > >A modern process model derived from the work on the UML and associated process. ● A dynamic perspective that shows phases over time ; 以動態角度來看顯示階段會隨著時間推移。 ● A static perspective that shows process activities; 以靜態來看顯示整個流程活動。 ● A practive perspective that suggests good practice. 以實踐角度來看提出好的做法。 ### **RUP Phases 四階段** * Inception > [color=gold] 建立Business Case * Elaboration > [color=green]了解問題本質和系統架構 * Construction > [color=orange]系統設計、建構和測試 * Transition > [color=purple]實際環境執行 --- ## Chapter 5. *Project Management and Planning* ### mana --- ## Chapter 6. *Project Scheduling and Risk Management* #### 專案排程 #### **風險管理** > 去辨識專案可能會遇到的風險 - 專案風險 - 影響專案時程及資源 - staff turnover - management change - hardware unavailability - 軟體風險 - 影響產品品質及效能 - requirement change - specification delays - size underestimate - CASE tool under-performance - 企業風險 - 影響組織的發展 - technology change - product competition ### **Risk management process** - risk identification - ==有哪些潛在風險== > Identify project, product and business risks - risk analysis - ==這些風險的發生機率及影響程度== > Assess the likelihood and consequences of these risks - risk planning - ==如何去對應風險== > Draw up plans to avoid or minimise the effects of the risk - risk monitoring - ==監視風險目前狀態== > Monitor the risks throughout the project --- ## Chapter 7. *Software Requirements* ### Functional and non-functional requirements ### Types of requirement - System requirements - 詳細描述系統功能 - User requirements - 使用者描述 ----------------------------------------------------------------------------- -------------------------------期中考 分隔線-------------------------- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ## Chapter 8. *System Models* ### „ 8.1 Context models ### „ 8.2 Behavioural models #### Data processing models > that show how data is processed as it moves through the system #### State machine models >that show ++the systems response to events++. show the system’s responses to stimuli so are often used for modelling ==real-time== systems ### „ 8.3 Data models ### „ 8.4 Object models ### „ 8.5 CASE workbenches #### Model types - Data processing model - Composition model - Architectural model - Classification - Stimulus/response model ### Context Model ----------------------------------------------------------------------------- ## Chapter 9. ![Uploading file..._hctjm7as7]() ----------------------------------------------------------------------------- ## Chapter 10. ----------------------------------------------------------------------------- ## Chapter 11. ----------------------------------------------------------------------------- ## Chapter 12. *Contemporary Rapid Software Development* ----------------------------------------------------------------------------- ## Chapter 13. ----------------------------------------------------------------------------- ## Chapter 14. *Verification and Validation* > Verification:確認達成規格 (requirements); > Validation:確認達成目的 (intended use)。 #### V&V 兩個目標 1. 發現系統本身缺陷 2. 評估系統操作可用性 #### V&V confidence 1. 系統功能重要性 2. 客戶對於不同功能的期望 3. 軟體時效性 #### 軟體檢驗 > 靜態驗證 - 看source code 文件看有沒有問題 > 動態驗證 - 實際執行測試 #### Testing vs. Debugging - Debugging 1.定位錯誤 2.設計修正 3.確認是否修復 4.if false jump 2. ----------------------------------------------------------------------------- ## Chapter 15. *Chapter 15 Static Analysis and Formal Development* ### 15.1 Automated static analysis 錯誤類別 1. Data faults <變數未初始化> <變數未使用> 3. Control faults <無法到達的code> <永遠不成立的條件> 4. Input/Output faults <無意義的賦值> 5. Interface faults <參數type不同> <參數個數不同> <回傳結果未使用> 6. Storage management faults <指標unassigned> <指標運算錯誤> #### 3 stage of static analysis Control flow analysis Data use ana --- ==上課內容== #### ch 8 Q1. ![請問電子商務系統的Context Model會有那些設計需要考慮 ?](https://i.imgur.com/z8eYyW2.png) > 請問電子商務系統的Context Model會有那些設計需要考慮 ? - 周邊系統方面 - 資訊安全方面 - 社會影響方面 - 組織需求方面 - 法律規範方面 #### Ch 8 Q2. ![](https://i.imgur.com/HLBAs8D.png) > Identify the classes in an air-condotioner - Describe the aggregation and generalization relationships among the classes. #### Ch 8 Q3. ![](https://i.imgur.com/rqa2kp2.png) #### Ch 8 Q4. ![](https://i.imgur.com/UqZtF9g.png)