Software Engineering for Digital Home 單元 3 :軟體設計 Chapter 3-6 – Specifying Interfaces.

Slides:



Advertisements
Similar presentations
Software Engineering for Digital Home 單元 2 :軟體處理程序與需求分析 2-3 需求工程處理程序 Presenter: Away.
Advertisements

建立使用案例敘述 --Use Case Narrative
學習C++的基本語法 認識關鍵字與識別字的不同 學習程式碼偵錯的流程 學習如何提高程式的可讀性
: A-Sequence 星級 : ★★☆☆☆ 題組: Online-judge.uva.es PROBLEM SET Volume CIX 題號: Problem D : A-Sequence 解題者:薛祖淵 解題日期: 2006 年 2 月 21 日 題意:一開始先輸入一個.
:Word Morphing ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10508:word morphing 解題者:楊家豪 解題日期: 2006 年 5 月 21 日 題意: 第一行給你兩個正整數, 第一個代表下面會出現幾個字串,
“Rule” By OX. By Check CREATE TABLE 員工薪資 ( 編號 int IDENTITY PRIMARY KEY, 薪資 smallmoney, CHECK ( 薪資 > 0 AND 薪資
3Com Switch 4500 切VLAN教學.
What is static?. Static? 靜態 ? class Test { static int staticX; int instanceX; public Test(int var1, int var2) { this.staticX = var1; this.instanceX =
教案課程片頭介紹 教案課程片頭是以圖片透過 Powerpoint 之動畫設 計功能轉變而成的動畫形式所呈現出來的影片, 目的是要讓老師們的課程顯得更加活潑、生動、 有趣,以往傳統的做法大部分都是以文字或投影 片的方式呈現,後來加以改良成為動畫呈現方式, 使得學生在複習課程方面能更加淺顯易懂、激發 出更多學習的興趣與樂趣。
指導教授:陳淑媛 學生:李宗叡 李卿輔.  利用下列三種方法 (Edge Detection 、 Local Binary Pattern 、 Structured Local Edge Pattern) 來判斷是否為場景變換,以方便使用者來 找出所要的片段。
: Factstone Benchmark ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: : Factstone Benchmark 解題者:鐘緯駿 解題日期: 2006 年 06 月 06 日 題意: 假設 1960.
亂數產生器安全性評估 之統計測試 SEC HW7 姓名:翁玉芬 學號:
1 實驗二 : SIP User Mobility 實驗目的 藉由 Registra 和 Redirect Server 的設計,深入瞭解 SIP 的運 作及訊息格式。 實作部分 ( 1 )實作一個 Registrar 來接收 SIP REGISTER ,而且 要將 REGISTER 中 Contact.
: OPENING DOORS ? 題組: Problem Set Archive with Online Judge 題號: 10606: OPENING DOORS 解題者:侯沛彣 解題日期: 2006 年 6 月 11 日 題意: - 某間學校有 N 個學生,每個學生都有自己的衣物櫃.
STAT0_sampling Random Sampling  母體: Finite population & Infinity population  由一大小為 N 的有限母體中抽出一樣本數為 n 的樣 本,若每一樣本被抽出的機率是一樣的,這樣本稱 為隨機樣本 (random sample)
例外處理. 內 容 大 綱 例外的產生 捕捉例外 丟出例外 例外的產生 (1/4) 一般常見的執行時期錯誤包括整數除法分母為 0(divide by zero) ,陣列索引值越限 (array index out of range) ,輸入輸出錯誤 (I/O error) 、檔案 不存在或無法存取.
Software Engineering for Digital Home 單元 3 :軟體設計 3-3 架構設計 Architecture Design- Addressing Design Goals.
各種線上電子資源的特異功能 STICnet 的 SDI 專題訂閱服務 2003/4/28 修改. 無論校內外皆可使用。連線至
第 18 章 名稱空間與例外處理 18-1 名稱空間 18-1 名稱空間 18-2 例外處理 18-2 例外處理.
1 網路同步學習 如何使用中山大學管理學院知識管理平台 愷中 製作. 2 如何登入中山大學網路學習平台 1. 首先, 請輸入 2. 點選申請帳號, 依照螢幕所示, 輸入個人資訊.
JAVA 程式設計與資料結構 第十章 GUI Introdution III. File Chooser  File Chooser 是一個選擇檔案的圖形介面, 無論我們是要存檔還是要開啟檔案,使 用這個物件都會讓我們覺得容易且舒適。
第 7 章 程序與函數 7-1 模組化程式設計 7-1 模組化程式設計 7-2 VB.NET 的程序與函數 7-2 VB.NET 的程序與函數 7-3 程序與函數的變數範圍 7-3 程序與函數的變數範圍 7-4 VB.NET 常用的內建函數 7-4 VB.NET 常用的內建函數 7-5 遞迴函數 7-5.
Chapter 13 塑模靜態觀點:物件圖 Static View : Object Diagram.
Introduction to Java Programming Lecture 17 Abstract Classes & Interfaces.
第 5 章 深入 Response 物件 製作. 網頁的轉向與強制輸出 - 讓網頁轉彎的 Redirect 敘述 運用 Response 物件的 Redirect 方法,將瀏覽器顯 示的網頁,導向至其他網頁,語法如下: Response.Redirect 網頁路徑與名稱 此網頁路徑與名稱  若是導向到同一台.
: The largest Clique ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11324: The largest Clique 解題者:李重儀 解題日期: 2008 年 11 月 24 日 題意: 簡單來說,給你一個 directed.
Chapter 20 塑模動態觀點:狀態圖 Statechart Diagram. 學習目標  說明狀態圖的目的  定義狀態圖的基本記號  展示狀態圖的建構  定義活動、內部事件及遞延事件的狀態 圖記號.
第二章 供給與需求 中興大學會計學系 授課老師:簡立賢.
: Happy Number ★ ? 題組: Problem Set Archive with Online Judge 題號: 10591: Happy Number 解題者:陳瀅文 解題日期: 2006 年 6 月 6 日 題意:判斷一個正整數 N 是否為 Happy Number.
: Fast and Easy Data Compressor ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10043: Fast and Easy Data Compressor 解題者:葉貫中 解題日期: 2007 年 3.
: Multisets and Sequences ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11023: Multisets and Sequences 解題者:葉貫中 解題日期: 2007 年 4 月 24 日 題意:在這個題目中,我們要定義.
1-6 動畫的文件屬性 舞台是動畫實際播放的畫面, 所以舞台的大 小與長寬比例對將來動畫的呈現有很大的 影響。 Flash 預設的舞台尺寸是 550 Pixels × 400 Pixels, 背景為白色, 如果要更改舞台大小與 背景色, 請執行『修改 / 文件』命令, 開啟文 件屬性 (Document.
:Nuts for nuts..Nuts for nuts.. ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 10944:Nuts for nuts.. 解題者:楊家豪 解題日期: 2006 年 2 月 題意: 給定兩個正整數 x,y.
資料結構實習-一 參數傳遞.
6-2 認識元件庫與內建元件庫 Flash 的元件庫分兩種, 一種是每個動畫專 屬的元件庫 (Library) ;另一種則是內建元 件庫 (Common Libraries), 兩者皆可透過 『視窗』功能表來開啟, 以下即為您說明。
著作權所有 © 旗標出版股份有限公司 第 21 章 文件的權限及保護 功能設定. 本章提要 設定文件讀取權限 保護文件.
1 Introduction to Java Programming Lecture 2: Basics of Java Programming Spring 2008.
: Problem G e-Coins ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10306: Problem G e-Coins 解題者:陳瀅文 解題日期: 2006 年 5 月 2 日 題意:給定一個正整數 S (0
Management Abstracts Retrieval System; MARS 檢索操作.
: A-Sequence ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10930: A-Sequence 解題者:陳盈村 解題日期: 2008 年 5 月 30 日 題意: A-Sequence 需符合以下的條件, 1 ≤ a.
函式 Function Part.2 東海大學物理系‧資訊教育 施奇廷. 遞迴( Recursion ) 函式可以「呼叫自己」,這種動作稱為 「遞迴」 此程式的執行結果相當於陷入無窮迴圈, 無法停止(只能按 Ctrl-C ) 這給我們一個暗示:函式的遞迴呼叫可以 達到部分迴圈的效果.
Image Interpolation Use SSE 指導教授 : 楊士萱 學 生 : 楊宗峰 日 期 :
JAVA 程式設計與資料結構 第二十章 Searching. Sequential Searching Sequential Searching 是最簡單的一種搜尋法,此演 算法可應用在 Array 或是 Linked List 此等資料結構。 Sequential Searching 的 worst-case.
資料結構實習-二.
: Expect the Expected ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11427: Expect the Expected 解題者:李重儀 解題日期: 2008 年 9 月 21 日 題意:玩一種遊戲 (a game.
845: Gas Station Numbers ★★★ 題組: Problem Set Archive with Online Judge 題號: 845: Gas Station Numbers. 解題者:張維珊 解題日期: 2006 年 2 月 題意: 將輸入的數字,經過重新排列組合或旋轉數字,得到比原先的數字大,
Linguistics phonetic symbols. 先下載 IPA 字型檔案,執行安裝。 由於這個程式的字型目錄設定錯誤, 所以等重新開機時就會發現字型消失。 所以必須根據以下步驟來讓 Windows 加入 IPA 字型。
Chapter 10 m-way 搜尋樹與B-Tree
Software Engineering for Digital Home 單元 2 :軟體處理程序與需求分析 2-2 軟體需求 Presenter: Away.
概念性產品企劃書 呂學儒 李政翰.
Probability Distribution 機率分配 汪群超 12/12. 目的:產生具均等分配的數值 (Data) ,並以 『直方圖』的功能計算出數值在不同範圍內出現 的頻率,及繪製數值的分配圖,以反應出該 機率分配的特性。
無線通訊網路 Mac 層 TDM 通訊模式的操作與效能研究 專題生 : 林書弘、蔡逸祥、毛建翔、王政 華 指導教授 : 黃依賢.
1 Introduction to Java Programming Lecture 2: Basics of Java Programming Spring 2009.
Biological Science Database 個人化服務設定步驟. Biological Science Database 僅提供專題選 粹服務 專題選粹 (Alerts) :查詢後,提供儲存檢 索策略的功能,日後每週將符合條件的 更新資料,採 方式通知。每筆設定 最多每週可收到.
第 4 章 視窗應用程式表單的基本 輸出入 4-1 VB.NET 的物件觀念 4-1 VB.NET 的物件觀念 4-2 表單類別 4-2 表單類別 4-3 按鈕控制項 4-3 按鈕控制項 4-4 輸出資料的標籤控制項 4-4 輸出資料的標籤控制項 4-5 輸入資料的文字方塊控制項 4-5 輸入資料的文字方塊控制項.
第 6 章 迴圈結構 6-1 計數迴圈 6-1 計數迴圈 6-2 條件迴圈 6-2 條件迴圈 6-3 巢狀迴圈 6-3 巢狀迴圈 6-4 While/End While 迴圈 6-4 While/End While 迴圈 6-5 跳出迴圈 6-5 跳出迴圈 6-6 VB.NET 的錯誤處理 6-6 VB.NET.
Teacher : Ing-Jer Huang TA : Chien-Hung Chen 2015/6/30 Course Embedded Systems : Principles and Implementations Weekly Preview Question CH7.1~CH /12/26.
著作權所有 © 旗標出版股份有限公司 第 3 章 資料庫物件的關係. 本章提要 Access 資料庫物件的關係 Access 資料庫物件的關係 簡介 Access 的七大物件 簡介 Access 的七大物件 Access 的群組 Access 的群組.
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 壹 企業研究導論.
統計緒論 _ Chap2 資料整理 2.1 基本的資料整理  排序,例: length of 60 sea trouts ( 課本 p13 ) ( 可用 EXCEL)  長條圖,例 2.1 number of times of delay in a week for the 48 flights.
函式 Function 東海大學物理系‧資訊教育 施奇廷. 函式簡介 當程式越來越大、越複雜時,程式的維護、 除錯會變得更困難,此時必須引入函式來 簡化程式或將程式分段,將程式重複的部 分改寫為函式,將程式「模組化」 這種作法有下列優點:節省程式發展的時 間、邏輯容易瞭解、程式容易除錯、可分 工合作完成程式.
Visual C++重點複習.
1 Introduction to Java Programming Lecture 2: Basics of Java Programming Spring 2010.
OmniFile Full Text 系列資料庫 個人化服務設定步驟. 此相關資料庫之個人化服 務只提供類似專題選粹的 服務,然無提供 mail 通知的 服務,讀者可建立個人 ID , 並儲存檢索策略,日後需 再進入該資料庫,查詢檢 索策略之新進文章。 導航目次 個人化服務說明 個人帳號密碼申請 個人化服務設定.
實體關係模型 (ER Model).
: Finding Paths in Grid ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11486: Finding Paths in Grid 解題者:李重儀 解題日期: 2008 年 10 月 14 日 題意:給一個 7 個 column.
著作權所有 © 旗標出版股份有限公司 第 14 章 製作信封、標籤. 本章提要 製作單一信封 製作單一郵寄標籤.
幼兒行為觀察與記錄 第八章 事件取樣法.
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
1 柱體與錐體 1. 找出柱體與錐體的規則 2. 柱體的命名與特性 3. 柱體的展開圖 4. 錐體的命名與特性 5. 錐體的展開圖
Presentation transcript:

Software Engineering for Digital Home 單元 3 :軟體設計 Chapter 3-6 – Specifying Interfaces

Software Engineering for Digital Home Outline Introduction Interface specification –Identifying missing attributes and operations –Specifying type, visibility and signature –Specifying contracts Discussions and Exercises 2

Software Engineering for Digital Home Software lift cycle 3 Software life cycle Development cycle Design ImplementationTesting Maintenance Requirements Engineering System design Object design Analysis Model (Class diagrams) Requirements Elicitation Analysis SRS Subsystem (Class diagram)

Software Engineering for Digital Home Use case Use case name 建立作業 Participating actors Initiated by 老師 Flow of events 1. 老師要建立作業. 2. 老師輸入作業的名稱 (50 字元 ), 作業的要求 (2000 字元 ), 截止日期 ( 日 期格式 ). 3. 系統檢查輸入的作業名稱, 作業的要求, 截止日期是否正確. 4. 如果正確, 系統就建立作業. Exceptions 3.1 如果所輸入的資料不正確, 系統要求使用者重新輸入. Entry condition 老師己登入教學網站. Exit conditions 老師在教學網站上建立了一個新的作業. 4

Software Engineering for Digital Home Class diagram 5 AssignmentForm createAssignment() set( name, context, due ) AssignmentControl checkdata() Assignment name context duedate

Software Engineering for Digital Home Interface specification 6 Identifying missing attributes and operations Object Design Document Specifying type, Visibility and signature Specifying Contracts Class interfaces Class diagrams Analysis Subsystem decomposition Refine class using design pattern

Software Engineering for Digital Home Identifying missing attributes and operations 分析後得到的 class diagrams 常常會漏掉很多 attribute 與 operation ,因為我們只把 use cases 轉成 class diagram 僅描述 系統功能 7 AssignmentForm createAssignment() setData( name, context, due ) AssignmentControl checkdata() Assignment name context duedate

Software Engineering for Digital Home Identifying missing attributes and operations 使用文字來說明作業內容學生不易於了解作業需 求 一般人對於圖片和範例等表現方式比較容易了其 意義 提供作業附件功能方便學生能夠藉由附件更了解 作業內容 8

Software Engineering for Digital Home Identifying missing attributes and operations 9 AssignmentForm createAssignment() setData( name, context, due, file ) AssignmentControl checkdata() uploadAttachment(file) Assignment name context duedate attachment AssignmentForm createAssignment() setData( name, context, due ) AssignmentControl checkdata() Assignment name context duedate

Software Engineering for Digital Home Type, Visibility and Signature Type (Attributes) –Name: string –maxNumPlayers: int –Start: date Visibility (Attributes and Operations) –Private: - –protected: # –public: + Signature (Operations) –acceptPlayer(Player): void –getMaxNumPlayers(void): int 10

Software Engineering for Digital Home Specifying type, visibility and signature Specifying the range of each attribute. ( 首先確定我們需要什麼類型及範圍的型態 ) We determine which types provided by the development environment. ( 接著看開發環境上有什麼型態符合我們第一步找出的需求類型及範圍 ) 11 AssignmentForm +createAssignment() +set( name, context, due, file ) AssignmentControl +checkdata():bool +uploadAttachment(file) Assignment +name:String +context:String +duedate:Date +attachment:File

Software Engineering for Digital Home Contracts Invariant –Specifying consistency constraints among class attributes. ( 凡屬於 class 的所有 instances 都要符合的限制 ) Precondition –Specifying constrains that a class user meet before calling the operation. (new 了一個 class 後,要使用它的 operation 前必須符合的限制 ) Postcondition –It’s a predicate that must be true after an operation is invoked. ( 執行了 operation 後必定會成立的條件 ) 12

Software Engineering for Digital Home Contract Notation OCL, Object Constraint Language [OMG, 1998]. A constraint is expressed as a boolean expression returning the value True or False. ( 描述限制的式子回傳值皆為 boolean 型態 ) 13 context AssignmentControl inv: //Condition (s) Keyword: contextClass or Operation AssignmentControl AssignmentControl ::checkdata() Constraint type inv > pre > post > Expression self.getSize(f) <

Software Engineering for Digital Home Specifying contracts 14 AssignmentControl +checkdata():bool +uploadAttachment( file: File):boolean -getLength(data:String): int -getSize(f:File): int -checkType(f:File): boolean -isCourseExist(id:int):boolean -isAttachmentUpload(f:File):boolean Public class AssignmentControl{ /* The Course exist at all times.*/ context AssignmentControl inv: isCourseExist(id) context AssignmentControl::uploadAttachment(file) pre: checkType(f) and getSize(f) < context AssignmentControl::uploadAttachment(file) post: isAttachmentUpload(f) … }

Software Engineering for Digital Home Exercises – 每一個 operation 都有 precondition 以及 postcondition 嗎 ? – 試以教學網站的 analysis model 設計 class interface. 15