版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、東北石油大學計算機與信息技術(shù)學院計算機科學系高俊濤高俊濤軟件工程PrefaceFrom the first chapter, you already know that the first step in writing great software is making sure it does what the customer wants it to. But how do you figure out what a customer really wants? And how do you make sure that the customer even knows what they
2、really want?In this chapter, you are going to learn how to satisfy you customer by making sure what you deliver is actually what they asked for.軟件工程Contents2.12.1Software RequirementsSoftware RequirementsThe ConceptThe ConceptThe difficultyThe difficulty2.22.2Use Case ModelingUse Case ModelingBuildi
3、ng BlocksBuilding BlocksRelationships between use casesRelationships between use casesGuidelines for use case modelGuidelines for use case model2.3 Conclusions2.3 Conclusions軟件工程The Definition of Software Requirements(1) A condition or capability needed by a user to solve a problem or achieve an obj
4、ective.(2) A condition or capability that must be met or possessed by a system or system component to satisfy a contract, standard, specification, or other formally imposed documents(3) A documented representation of a condition or capability as in (1) or (2)2.1 軟件需求的概念軟件工程The complexity of requirem
5、ents analysis(1)Requirements are not clear(1)Requirements are not clearIts hard for users to figure out what they really need!The story of the cow and the peasantIts hard for users to express what they want!Can you tell me the size of your shoes precisely? Its a nightmare to meet the users who know
6、IT a little!2.1 軟件需求的概念軟件工程The complexity of requirements analysis(2)Requirements keep changing(2)Requirements keep changing2.1 軟件需求的概念Users:Knowledge about IT is not enoughThe description is not clearThe importance of requirements is not understoodBusiness scope keep changingBusiness process changi
7、ng軟件工程The complexity of requirements analysis(2)Requirements keep changing(2)Requirements keep changing2.1 軟件需求的概念Developers:The technology of communication is not enoughLack of knowledge of requirements engineeringDont grasp the business processes of usersRequirements are not clear and detailedThe
8、management of project is disorder軟件工程Use Case DiagramUse case diagrams are used to visualize, specify, construct, and document the (intended) behavior of the system, during requirements capture and analysis. Provide a way for developers, domain experts and end-users to Communicate.ActorActorUse Case
9、Use Case2.3 需求分析技術(shù):功能分析軟件工程Use CaseUse cases specify desired behavior. A use case is a description of a set of sequences of actions that a system performs to yield an observable result of value to an actor.Describes a system from an external usage 軟件工程Specifying the Behavior of a Use C
10、aseDescribing the flow of events within the use case.Can be done in natural language, formal language or pseudo-code.Includes: how and when the use case starts and ends; when the use case interacts with actors and what objects are exchanged; the basic flow and alternative flows of the behavior.軟件工程A
11、ctorsAn actor represents a set of roles that users of use case play when interacting with these use cases.Actors can be human or automated systems.Actors are entities which require help from the system to perform their task or are needed to execute the systems functions.Actors are not part of the sy
12、軟件工程Use Cases and ActorsFrom the perspective of a given actor, a use case does something that is of value to the actor, such as calculate a result or change the state of an object.The Actors define the environments in which the system lives軟件工程Example for Use CaseUser of mobileSends Message
13、Make a phone callSearch for numbers2.3 需求分析技術(shù):功能分析軟件工程How to identify actors?Actor is anyone or anything that interacts with the system causing it to respond to eventsAn actor may be:The user to use the system.The other software system that interact with the system.The other hardware system that int
14、eract with the system.notice:sometimes timer may be regarded as an actor.軟件工程How to identify an use case?(Jacobson):the instance of an use case is a set of actions of the system. These actions will bring obvious value to the user. An use case define a set of scenario (the instance of an use case)Use
15、 cases is the objectives that the user want to achieve using the system.User of mobileMake a calling軟件工程Need to noticeobservable result of value to an actorThe use cases bring valuable resultuser PerspectiveUsing business language describe use casesA set of business scenarios用例的實例也稱為場景:是執(zhí)行者使用系統(tǒng)的一個特定
16、情節(jié)或用例的一條執(zhí)行路徑。例如:通過輸入電話號碼撥打電話的場景通過查打電話號碼簿撥打電話的場景通過查打電話號碼簿撥打電話,電話打到一半電話欠費的場景 軟件工程The guideline to modeling use cases Use cases are short textsUse cases may be an scenarioUse cases may be a set of scenarioUse cases dont include designUse cases dont include user interfacesUse cases dont include testingt
17、he count of actions of a primary scenario is less than 9The secondary scenario is more important that primary scenario 軟件工程The process of use case modelingDetermine the scope of the systemDetermine the actorsDetermine the use casesDescribe the use casesDefine the relationships between use casesRevie
18、w the use case modelUse case is document, not the diagramUse case is document, not the diagram!軟件工程The content of an use caseThe objective of the use caseWhen does the actor initialize the use caseThe message between use cases and actorsThe entities that are modified during the use caseThe event flo
19、w in exceptionThe result of the use caseexample:Name:select courseActor:studentObjective:complete a process of selecting coursetype:primarylevel:one 軟件工程Typical flow of event:The student types in number and password, the system verifies the account;The system judge whether the student has registered
20、 or not;The student navigate the courses of this Semester;The student select the course and confirm;Logout the system, and the system lists the selected courses and calculates the total credit.Exceptional flow of event:Its failure to verify the account, allow the student to retype in number and pass
21、word (not more than three times) The system finds the student has not registered, so do not allow the student to select courses. 1. The selected courses conflict in time, so prompt to select courses again. 軟件工程Use case diagramMobile userSend messageInput numberMake a phone callSearch numberSend mult
22、imedia message2.3 需求分析技術(shù):功能分析Get time of calling軟件工程Relationships between Use CasesGeneralization - use cases that are specialized versions of other use cases.2. Include - use cases that are included as parts of other use cases. Enable to factor common behavior.3. Extend - use cases that extend the
23、behavior of other core use cases. Enable to factor variants.軟件工程 Include(包含關(guān)系)The base use case explicitly incorporates the behavior of another use case at a location specified in the base.The included use case never stands alone. It only occurs as a part of some larger base that includes it.baseinc
24、luded軟件工程Include(包含關(guān)系)包含用例的行為插入到基本用例中的一個位置。當遵循基本用例說明的用例實例到達基本用例中定義了包含關(guān)系的位置,它就將改而遵循包含用例的說明。一旦執(zhí)一旦執(zhí)行完包含用例,用例實行完包含用例,用例實例就將在基本用例中它例就將在基本用例中它先前停止的地方重新開先前停止的地方重新開始。始。軟件工程教師維護學生成績錄入成績修改成績刪除成績軟件工程用例的包含關(guān)系的要點1.包含用例本身是不完整的,它必須擁有基本用例以保證完整性。2.包含用例本身并不知道自己何時或是否被包含。因此,它不能依賴任何包含它的用例。3.被包含的用例一定可以被另外的用例包含(即共用性和獨立性)4.
25、從工程角度上,包含關(guān)系用于系統(tǒng)分析時共性功能的合并、抽取。5.包含關(guān)系通常在用例建模后期而不是前期被發(fā)現(xiàn)。軟件工程描述包含關(guān)系應(yīng)在基本用例的行為序列中定義要插入包含用例的位置。要定義該位置,可以引用基本用例事件流中的特定步驟或分支流。軟件工程Extend(擴展關(guān)系)The base use case implicitly incorporates the behavior of another use case at certain points called extension points.The base use case may stand alone, but under certa
26、in conditions its behavior may be extended by the behavior of another use case.baseextending軟件工程用例擴展關(guān)系的概念一個用例的實例可能增加了一些附加的行為,這些附加的行為在另一個用例中定義,擴展定義了這兩個用例之間的關(guān)系?;居美居美梢詥为毚嬖?,但是在一定的條件下,它的行為可以被另一個用例的行為擴展。當一個用例有多個當一個用例有多個可選系統(tǒng)行為時,時,可以用擴展關(guān)系對其進行擴展,使得基本用例的不同子流程能在不同的情形下以擴展用例的形式被激活。通過這種方式,可以把可選行為從必須行為中分離出來。軟件
27、工程用例擴展關(guān)系的概念用例擴展關(guān)系的概念基本用例基本用例 擴展點擴展點具有條件具有條件擴展用例擴展用例執(zhí)行執(zhí)行返回返回軟件工程用例間關(guān)系-extends擴展用例可以有基本事件流和備選事件流。用例實例通過擴展到底會采取哪條路徑,這不僅取決于在執(zhí)行之執(zhí)行擴展前發(fā)生的事件,而且還取決于執(zhí)行擴展時在與主角的交互中發(fā)生的事件執(zhí)行擴展 。用例執(zhí)行擴展實例一旦執(zhí)行了擴展,它就會在基本用例的中斷點處繼續(xù)執(zhí)行基本用例。軟件工程執(zhí)行擴展一個擴展用例可以有多個插入段,每個插入段都與自己在基本用例中的擴展點相關(guān)。用例實例將繼續(xù)執(zhí)行基本用例,并持續(xù)到擴展關(guān)系中指定的下一個擴展點為止。在此點上,它將執(zhí)行擴展用例的下一個插
28、入段。這會重復進行,直到執(zhí)行完最后一個插入段為止。軟件工程教師查詢學生成績導出查詢結(jié)果打印查詢結(jié)果軟件工程包含關(guān)系與擴展關(guān)系的區(qū)別包含關(guān)系包含關(guān)系1. 當在兩個或多個獨立用例重復自已并希望避免重復時2. 在基本用例上插入附加行為并具有明確的描述3. 包含用例作為基本用例自身行為的一部分4. 包含關(guān)系是無條件的 擴展關(guān)系擴展關(guān)系1. 當表述關(guān)于正常行為的一個變化情況時2. 在基本用例上插入基本用例不能說明的擴展部分3. 擴展用例作為基本用例的增量擴展4. 擴展用例是按條件要求執(zhí)行的軟件工程包含關(guān)系與擴展關(guān)系的區(qū)別包含關(guān)系包含關(guān)系1. 包含用例是共用的用例2. 一個基本用例可以有多個包含用例。3. 一個包含用例可以包含在若干基本用例中。4.很難在包含關(guān)系上對系統(tǒng)進行維護修改。擴展關(guān)系擴展關(guān)系1. 擴展用例不是共用的用例2. 把可選行為從必須行為中分離出來3. 有條件地擴展已有用例的行為。4. 基本用例可以獨立于擴展用例單獨存在。5. 適合于功能需求的增加(基本用例的增量擴展)軟件工程Notice Ibusiness language, not technique lanugaecostcost,productproduct,profitprofitC+C+,ClassClass,.
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 藝術(shù)活動特色課程設(shè)計
- 汽車租賃管理課程設(shè)計
- 湘繡美術(shù)課程設(shè)計
- 藝術(shù)課創(chuàng)意游戲課程設(shè)計
- 草藥烘焙課程設(shè)計
- 紙箱印刷工藝課程設(shè)計
- 職業(yè)主題運動課程設(shè)計
- 育子課程設(shè)計
- 糕點烘焙培訓課程設(shè)計
- 專業(yè)發(fā)展路徑探索
- 2024(部編版)道德與法治九年級上冊 第二單元 民主與法治 單元測試(學生版+解析版)
- 醫(yī)療護理員基礎(chǔ)理論知識考試試題題庫及答案
- 2024年高考英語詞匯表-帶音標
- 墊底辣妹教育學思考(3篇模板)
- 框架結(jié)構(gòu)設(shè)計國內(nèi)外研究現(xiàn)狀
- 基因檢測銷售基礎(chǔ)知識培訓手冊
- 創(chuàng)新人才認證(解決方案)考試題庫(附答案)
- 新質(zhì)生產(chǎn)力-講解課件
- 湖北省隨州市曾都區(qū)2023-2024學年九年級上學期期末考試英語試題
- 2023-2024學年人教版七年級下冊地理知識清單
- 20以內(nèi)最大最小能填幾專項練習126+129題
評論
0/150
提交評論