




已阅读5页,还剩60页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Capturing the Requirements,中国科学技术大学软件学院孟宁,2011年9月,Contents,4.1 The Requirements Process4.2 Requirements Elicitation4.4 Types of Requirements4.4 Characteristic of Requirements4.5 Modeling Notations4.6Requirements and Specification Languages4.7Prototyping Requirements4.8Requirements Documentation4.9Validation and Verification4.10Measuring Requirements4.11 Choosing a Specification Technique,Chapter 4 Objectives,Eliciting requirements from the customersModeling requirementsReviewing requirements to ensure their qualityDocumenting requirements for use by the design and test teams,4.1 The Requirements Process,A requirement is an expression of desired behaviorA requirement deals withobjects or entitiesthe state they can be infunctions that are performed to change states or object characteristicsRequirements focus on the customer needs, not on the solution or implementationdesignate what behavior, without saying how that behavior will be realized,4.1 The Requirements ProcessSidebar 4.1 Why Are Requirements Important?,Top factors that caused project to failIncomplete requirementsLack of user involvementUnrealistic expectationsLack of executive supportChanging requirements and specificationsLack of planningSystem no longer neededSome part of the requirements process is involved in almost all of these causesRequirements error can be expensive if not detected early,需求获取的主要困难,4.1 The Requirements ProcessProcess for Capturing Requirements,Performed by the req. analyst or system analystThe final outcome is a Software Requirements Specification (SRS) document,4.1 The Requirements ProcessSidebar 4.2 Agile Requirements Modeling,If requirements are tightly coupled and complex, we may be better off with a “heavy” process that empasizes up-front modelingIf the requirements are uncertain, agile methods are an alternative approachAgile methods gather and implement the requirements in incrementsExtreme Programming (XP) is an agile process The requirements are defined as we build the systemNo planning or designing for possible future requirementsEncodes the requirements as test cases that eventually implementation must pass,4.2 Requirements Elicitation,Customers do not always undertand what their needs and problems areIt is important to discuss the requirements with everyone who has a stake in the systemCome up with agreement on what the requirements areIf we can not agree on what the requirements are, then the project is doomed to fail,4.2 Requirements ElicitationStakeholders,Clients: pay for the software to be developedCustomers: buy the software after it is developedUsers: use the systemDomain experts: familiar with the problem that the software must automateMarket Researchers: conduct surveys to determine future trends and potential customersLawyers or auditors: familiar with government, safety, or legal requirementsSoftware engineers or other technology experts,4.2 Requirements ElicitationMeans of Eliciting Requirements,Interviewing stake holdersReviewing available documentationsObserving the current system (if one exists)Apprenticing with users to learn about users task in more detailsInterviewing user or stakeholders in groupsUsing domain specific strategies, such as Joint Application DesignBrainstorming with current and potential users,4.2 Requirements ElicitationMeans of Eliciting Requirements (continued),The Volere requirements process model suggests some additional sources for requirements,4.3 Types of Requirements,Functional requirement: describes required behavior in terms of required activitiesQuality requirement or nonfunctional requirement: describes some quality characteristic that the software must possesDesign constraint: a design decision such as choice of platform or interface componentsProcess constraint: a restriction on the techniques or resources that can be used to build the system,4.3 Types of RequirementsSidebar 4.4 Making Requirements Testable,Fit criteria form objective standards for judging whether a proposed solution satisfies the requirementsIt is easy to set fit criteria for quantifyable requirementsIt is hard for subjective quality requirementsThree ways to help make requirements testableSpecify a quantitave description for each adverb and adjectiveReplace pronouns with specific names of entitiesMake sure that every noun is defined in exactly one place in the requirements documents,4.3 Types of RequirementsResolving Conflicts,Different stakeholder has different set of requirementspotential conflicting ideasNeed to prioritize requirementsPrioritization might separate requirements into three categoriesessential: absolutely must be metdesirable: highly desirable but not necessaryoptional: possible but could be eliminated,4.3 Types of RequirementsTwo Kinds of Requirements Documents,Requirements definition: a complete listing of everything the customer wants to achieveDescribing the entities in the environment where the system will be installedRequirements specification: restates the requirements as a specification of how the proposed system shall behave,4.3 Types of RequirementsTwo Kinds of Requirements Documents (continued),Requirements defined anywhere within the environments domain, including the systems interfaceSpecification restricted only to the intersection between environment and system domain,4.4 Characteristics of Requirements,CorrectConsistentUnambigious无二义性CompleteFeasibleRelevant无与主要目标不相关的需求TestableTraceable,4.5 Modeling Notations,It is important to have standard notations for modeling, documenting, and communicating decisionsModeling helps us to understand requirements thoroughlyHoles in the models reveal unknown or ambiguous behaviorMultiple, conflicting outputs to the same input reveal inconsistencies in the requirements,4.5 Modeling NotationsEntity-Relationship Diagrams,A popular graphical notational paradigm for representing conceptual modelsHas three core constructsAn entity: depicted as a rectangle, represents a collection of real-world objects that have common properties and behaviorsA relationship: depicted as an edge between two entities, with diamond in the middle of the edge specifying the type of relationshipAn attribute: an annotation on an entity that describes data or properties associated with the entity,4.5 Modeling NotationsEntity-Relationship Diagrams (continued),Entity diagram of turnstile problem,4.5 Modeling NotationsEntity-Relationship Diagrams (continued),ER diagrams are popular becausethey provide an overview of the problem to be addressedthe view is relatively stable when changes are made to the problems requirementsER diagram is likely to be used to model a problem early in the requirements process,4.5 Modeling NotationsER Diagrams Example: UML Class Diagram,UML (Unified Modeling Language) is a collection of notations used to document software specifications and designsIt represents a system in terms of objects: akin to entities, organized in classes that have an inheritance hierarchymethods: actions on the objects variablesThe class diagram is the flagship model in any UML specificationA sophisticated ER diagram relating the classes (entities) in the specification,4.5 Modeling NotationsUML Class Diagram of Library Problem,4.5 Modeling NotationsUML Class Diagram (continued),Attributes and operations are associated with the class rather than instances of the classA class-scope attribute represented as an underlined attribute, is a data value that is shared by all instances of the classA class-scope operation written as underlined operation, is an operation performed by the abstract class rather than by class instancesAn association, marked as a line between two classes, indicates a relationship between classes entities,4.5 Modeling NotationsUML Class Diagram (continued),Aggregate association is an association that represents interaction, or events that involve objects in the associated (marked with white diamond)“has-a” relationshipComposition association is a special type of aggregation, in which instances of the compound class are physically constructed from instances of component classes (marked with black diamond),4.5 Modeling NotationsEvent Traces,A graphical description of a sequence of events that are exchanged between real-world entitiesVertical line: the timeline of distinct entity, whose name appear at the top of the lineHorizontal line: an event or interaction between the two entities bounding the lineTime progresses from top to bottomEach graph depicts a single trace, representing one of several possible behaviorsTraces have a semantic that is relatively precise, simple and easy to understand,4.5 Modeling NotationsEvent Traces (continued),Graphical representation of two traces for the turnstile problemtrace on the left represents typical behaviortrace on the right shows exceptional behavior,4.5 Modeling NotationsEvent Traces Exampe: Message Sequence Chart,An enhanced event-trace notation, with facilities for creating and destroying entities, specifiying actions and timers, and composing tracesVertical line represents a participating entityA message is depicted as an arrow from the sending entity to the receiving entityActions are specified as labeled rectangles positioned on an entitys execution lineConditions are important states in an entitys evolution, represented as labeled hexagon,4.5 Modeling NotationsMessage Sequence Chart (continued),Message sequence chart for library loan transaction,4.5 Modeling NotationsState Machines,A graphical description of all dialog between the system and its environmentNode (state) represents a stable set of conditions that exists between event occurencesEdge (transition) represents a change in behavior or condition due to the occurrence of an eventUseful both for specifying dynamic behavior and for describing how behavior should change in response to the history of events that have already occurred,4.5 Modeling NotationsState Machines (continued),Finite state machine model of the tunstile problem,4.5 Modeling NotationsState Machines (continued),A path: starting from the machines initial state and following transitions from state to stateA trace of observable events in the environmentDeterministic state machine: for every state and event there is a unique response,4.5 Modeling NotationsState Machines Example: UML Statechart Diagrams,A UML statechart diagram depicts the dynamic behavior of the objects in a UML classUML class diagram has no information about how the entities behave, how the behaviors changeA UML model is a collection of concurrently executing statechartsUML statechart diagram have a rich syntax, including state hierarchy, concurrency, and intermachine coomunication,4.5 Modeling NotationsUML Statechart Diagrams (continued),State hierarchy is used to unclutter diagrams by collecting into superstate those states with common transitionsA superstate can actually comprise multiple concurrent submachines, separated by dashed lineThe submachines are said to operate concurrently,4.5 Modeling NotationsUML Statechart Diagrams (continued),The UML statechart diagram for the Publication class from the Library class model,4.5 Modeling NotationsUML Statechart Diagrams (continued),An equivalent statechart for Publication class that does not make use of state hierarchy or concurrencycomparatively messy and and repetitive,4.5 Modeling NotationsUML Statechart Diagrams (continued),The UML statechart diagram for Loan association class illustrates how states can be annotated with local variables, actions and activities,4.5 Modeling NotationsState Machines: Ways of Thinking about State,Equivalence classes of possible future behaviorPeriods of time between consecutive eventNamed control points in an objects evolution Partition of an objects behavior,4.5 Modeling NotationsData-Flow Diagrams (continued),A high-level data-flow diagram for the library problem,4.5 Modeling NotationsData-Flow Diagrams (continued),Advantage:Provides an intuitive model of a proposed systems high-level functionality and of the data dependencies among various processesDisadvantage:Can be aggravatingly ambiguous to a software developer who is less familiar with the problem being modeled,4.5 Modeling NotationsData-Flow Diagrams Example: Use Cases,ComponentsA large box: system boundaryStick figures outside the box: actors, both human and systemsEach oval inside the box: a use case that represents some major required functionality and its variantA line between an actor and use case: the actor participates in the use caseUse cases do not model all the tasks, instead they are used to specify user views of essential system behavior,4.5 Modeling NotationsUse Cases (continued),Library use cases including borrowing a book, returning a borrowed book, and paying a library fine,4.5 Modeling NotationsFunctions and Relations,Formal methods or approach: mathematically based specification and design techniquesFormal methods model requirements or software behavior as a collection of mathematical functions or relationsFunctions specify the state of the systems execution, and outputA relation is used whenever an input value maps more than one ouput valueFunctional method is consistent and complete,4.5 Modeling NotationsFunctions and Relations (continued),Example: representing turnstile problem using two functionsOne function to keep track of the stateOne function to specify the turnstile output,4.5 Modeling NotationsFunctions and Relations Example: Decision Tables,It is a tabular representation of a functional specification that maps events and conditions to appropriate reponses or actionThe specification is formal because the inputs (events and conditions) and outputs (actions) may be expressed in natural languageIf there is n input conditions, there are 2n possible combination of input conditionsCombinations map to the same set of result can be combined into a single column,4.5 Modeling NotationsDecision Tables (continued),Decision table for library functions borrow, return, reserve, and unreserve,4.6 Requirements and Specification LanguagesUnified Modeling Language (UML),Combines multiple notation paradigmsEight graphical modeling notations, and the OCL constrain language, includingUse-case diagram (a high-level DFD)Class diagram (an ER diagram)Sequence diagram (an event trace)Collaboration diagram (an event trace)Statechart diagram (a state-machine model)OCL properties (logic),4.7 Prototyping RequirementsBuilding a Prototype,To elicit the details of proposed systemTo solicit feedback from potential users aboutwhat aspects they would like to see improvewhich features are not so usefulwhat functionality is missingDetermine whether the customers problem has a feasible solutionAssist in exploring options for otimizing quality requirements,4.7 Prototyping RequirementsApproaches to Prototyping,Throwaway approachDeveloped to learn more about a problem or a proposed solution, and that is never intended to be part of the delivered softwareAllow us to write “quick-and-dirty”Evolutionary approachDeveloped not only to help us answer questions but also to be incorporated into the final productPrototype has to eventually exhibit the quality requirements of the final product, and these qualities cannot be retrofittedBoth techniques are sometimes called rapid prototyping,4.7 Prototyping RequirementsPrototyping vs. Modeling,PrototypingGood for answering questions about the user interfaces Modeling Quickly answer questions about constraints on the order in which events should occur, or about the synchronization of activities,4.8 Requirements DocumentationRequirement Definition: Steps Documenting Process,Outline the general purpose and scope of the system, including relevant benefits, objectives, and goalsDescribe the background and the rationale behind proposal for new systemDescribe the essential characteristics of an accepatable solutionDescribe the environment in which the system will operateOutline a description of the proposal, if the customer has a proposal for solving the problemList any assumptions we make about how the environment behaves,4.8 Requirements DocumentationRequirements Specification: Steps Documenting Process,Describe all inputs and outputs in detail, includingthe sources of inputsthe destinations of ouputs, the value ranges data format of inputs and output datadata protocolswindow formats and organizationstiming constraint Restate the required functionality in terms of the interfaces inputs and outputsDevise fit criteria for each of the customers quality requirements,4.8 Requirements DocumentationSidebar 4.6 Level of Specification,Survey shows that one of the problems with requirement specifications was the uneven level of specificationDifferent writing sytlesDifference in experienceDifferent formatsOverspecifying requirementsUnderspecifying requirementsRecommendations to reduce unevennessWrite each clause so that it contains only one requirementAvoid having one requirement refer to another requirementCollect similar requirements together,4.8 Requirements DocumentationIEEE Standard for SRS Organized by Objects,Intodruction to the Document1.1 Purpose of the Product1.2 Scope of the Product1.3 Acronyms, Abbreviations, Definitions1.4 References1.5 Outline of the rest of the SRSGeneral Description of Product2.1 Context of Product2.2 Product Functions2.3 User Characteristics2.4 Constraints2.5 Assumptions and DependenciesSpecific Requirements3.1 External Interface Requirements3.1.1 User Interfaces3.1.2 Hardware Interfaces3.1.3 Software Interfaces3.1.4 Communications Interfaces,3.2 Functional Requirements3.2.1 Class 13.2.2 Class 23.3 Performance Requirements3.4 Design Constraints3.5 Quality Requirements3.6 Other Requirements4.Appendices,4.8 Requirements DocumentationProcess Management an
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 车队运输时效保障合同范本模板
- 餐饮加盟商信息保密合同范本
- 餐饮业店铺租赁合同及食品安全责任书
- 芯片销售保密协议书范本
- 中草药购销协议书范本
- 餐饮店股东合作协议及知识产权保护
- 甜品店品牌授权及区域代理合同
- 生态环保项目拆旧房屋搬迁与补偿协议范本
- 古董拍卖委托授权合同模板
- 餐饮业股权并购及品牌授权与经营合同
- 2022年脱硝试题库
- 《幼儿园中班第一学期家长会》 PPT课件
- 全国202X年4月自学考试公文写作与处理试题和答案解析.doc
- 杜邦安全理念课件
- 《房屋面积测算技术规程》DGJ32TJ131-2011
- 管道无损检测施工专项方案
- 酒店工程部考核表
- 槽钢桩支护施工方案
- 土石坝剖面图绘制12.28
- 水利水电工程防渗墙工程质量检测
- 工程塑料 第六章聚甲醛
评论
0/150
提交评论