Ch07 - Software Engineering: A Practitioner’s Approach,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Software Engineering: A Practitioner’s Approach, 6/e Chapter 7 Requirements Engineering copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc. NOTE: Some slides referenced from: Ian Sommerville Slides for Software Engineering. These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1 What is a requirement? It may range from a high­level abstract statement of a service or of a system constraint to a detailed mathematical functional specification This is inevitable as requirements may serve a dual function May be the basis for a bid for a contract ­ therefore must be open to interpretation May be the basis for the contract itself ­ therefore must be defined in detail Both these statements may be called requirements These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 2 Requirements Definition Should specify external behavior of the system so the requirements should not be defined using a computational model Includes functional and non­functional requirements Functional requirements are statements of the services that the system should provide Non­functional requirements are constraints on the services and functions offered by the system These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 3 Wicked Problems Most large software systems address wicked problems Problems which are so complex that they can never be fully understood and where understanding develops during the system development Therefore, requirements are normally both incomplete and inconsistent These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4 Requirements Engineering­I Inception—ask a set of questions that establish … basic understanding of the problem the people who want a solution the nature of the solution that is desired, and the effectiveness of preliminary communication and collaboration between the customer and the developer Elicitation—elicit requirements from all stakeholders Elaboration—create an analysis model that identifies data, function and behavioral requirements Negotiation—agree on a deliverable system that is realistic for developers and customers These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 5 Requirements Engineering­II Specification—can be any one (or more) of the following: Validation—a review mechanism that looks for A written document A set of models A formal mathematical A collection of user scenarios (use­cases) A prototype errors in content or interpretation areas where clarification may be required missing information inconsistencies (a major problem when large products or systems are engineered) conflicting or unrealistic (unachievable) requirements. Requirements management These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6 Inception Identify stakeholders “who else do you think I should talk to?” Recognize multiple points of view Work toward collaboration The first questions Who is behind the request for this work? Who will use the solution? What will be the economic benefit of a successful solution Is there another source for the solution that you need? These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7 Eliciting Requirements meetings are conducted and attended by both software engineers and customers rules for preparation and participation are established an agenda is suggested a "facilitator" (can be a customer, a developer, or an outsider) controls the meeting a "definition mechanism" (can be work sheets, flip charts, or wall stickers or an electronic bulletin board, chat room or virtual forum) is used the goal is to identify the problem propose elements of the solution negotiate different approaches, and specify a preliminary set of solution requirements These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 8 Eliciting Requirements Co n d u c t FA ST m e e t in g s Ma k e lis t s o f f u n c t io n s , c la s s e s Ma k e lis t s o f c o n s t r a in t s , e t c . f o r m a l p r ior it iz a t io n ? El i c i t re q u i re m e n t s no y es Us e QFD t o p r io r it iz e r e q u ir e m e n t s d ef ine a c t o r s in f o r m a lly p r io r it iz e r e q u ir e m e n t s dr a w u s e ­ c as e d ia gr a m w r it e s c e n a r io Cr e a t e Us e ­ c a s e s c o m p le t e t em p la t e These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 9 Elicitation Work Products a statement of need and feasibility. a bounded statement of scope for the system or product. a list of customers, users, and other stakeholders who participated in requirements elicitation a description of the system’s technical environment. a list of requirements (preferably organized by function) and the domain constraints that apply to each. a set of usage scenarios that provide insight into the use of the system or product under different operating conditions. any prototypes developed to better define requirements. These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 10 Use­Cases A collection of user scenarios that describe the thread of usage of a system Each scenario is described from the point­of­view of an “actor”—a person or device that interacts with the software in some way Each scenario answers the following questions: Who is the primary actor, the secondary actor (s)? What are the actor’s goals? What preconditions should exist before the story begins? What main tasks or functions are performed by the actor? What extensions might be considered as the story is described? What variations in the actor’s interaction are possible? What system information will the actor acquire, produce, or change? Will the actor have to inform the system about changes in the external environment? What information does the actor desire from the system? Does the actor wish to be informed about unexpected changes? These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11 Use­Case Diagram A r m s / d i s a r ms s y s t em A c c e s s e s s y s t e m v i a I n t e r ne t s en s or s hom eow ner Res ponds t o a l a r m e v e n t Enc ount er s an e r r o r c o nd i t i o n s y s t em adm i ni s t r at or Rec onf i gur es s ens or s a n d r e l a t e d s y s t e m f e a t u r e s These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 12 Building the Analysis Model Elements of the analysis model Scenario­based elements Class­based elements Implied by scenarios Behavioral elements Functional—processing narratives for software functions Use­case—descriptions of the interaction between an “actor” and the system State diagram Flow­oriented elements Data flow diagram These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 13 Class Diagram From the SafeHome system … From SafeHome Sensor name/id type location area characteristics identify() enable() disable() reconfigure () These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 14 State Diagram Readi ng c om m a n ds In i t i a l i z a t i o n t u r n c o p i e r “ on“ subsy st ems sy st em st at us=“ not r eady ” r ea d y di spl ay msg = “ pl ease wai t ” di spl ay st at us = bl i nk i ng ent r y / swi t c h mac hi ne on do: r un di agnost i c s do: i ni t i at e al l subsy st ems n o t j a m me d sy st em st at us=“ Ready ” di spl ay msg = “ ent er c md” di spl ay st at us = st eady p a p er f u l l ent r y / subsy st em s r eady do: pol l user i nput panel do: r ead user i nput do: i nt er pr et user i nput t u r n c o p i e r “ o f f ” st ar t c opi es Mak i ng c opi es sy st em st at us=“ Copy i ng” di spl ay msg= “ c opy c ount =” di spl ay message=#c opi es di spl ay st at us= st eady ent r y / st ar t c opi es d o : m a n a g e c o p y i n g d o : m o n i t o r p a p e r t r a y d o : m o n i t o r p a p e r f l o w c opi es c ompl et e p a p e r t r ay e m p t y p a p e r j a m m e d pr obl em di agnosi s sy st em st at us=“ Jammed” di spl ay msg = “ paper j am” di spl ay message=l oc at i on di spl ay st at us= bl i nk i ng l o a d p ap e r sy st em st at us=“ l oad paper ” di spl ay msg= “ l oad paper ” di spl ay st at us= bl i nk i ng ent r y / paper empt y do: l ower paper t r ay do: moni t or f i l l swi t c h do: r ai se paper t r ay n ot j am m e d e n t r y / pa p e r j a m m ed d o : d e t e r m i n e l oc a t i o n do: pr ov i de c or r ec t i v emsg. d o : i n t e r r u p t m ak i n g c op i e s Fig u r e 7 .6 Pr e lim in ar y UML st at e d iag ram f o r a p h o t o co p i e r These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 15 Negotiating Requirements Identify the key stakeholders Determine each of the stakeholders “win conditions” These are the people who will be involved in the negotiation Win conditions are not always obvious Negotiate Work toward a set of requirements that lead to “win­win” These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 16 Reasons we need to negotiate Large software systems must improve the current situation. It is hard to anticipate the effects that the new system will have on the organization Different users have different requirements and priorities. There is a constantly shifting compromise in the requirements System end­users and organizations who pay for the system have different requirements Prototyping is often required to clarify requirements These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 17 Requirements Document Structure Purpose Overall Description System Features (Functional Requirements/Use Cases) External Interface Requirements User interface requirements or standards Hardware interfaces to other systems Software interfaces to other systems Communication Interfaces Non­functional Requirements Appendices See SRS Template on the CS421 project page (provided by http://www.processimpact.com/). These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 18 Requirements Rationale It is important to provide rationale with requirements (this will be part of our description in the requirements specification document). This helps the developer understand the application domain and why the requirement is stated in its current form Particularly important when requirements have to be changed. The availability of rationale reduces the chances that change will have unexpected effects These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 19 Non­Functional Requirement Types Product requirements Organizational requirements Requirements which specify that the delivered product must behave in a particular way e.g. execution speed, reliability, etc. Requirements which are a consequence of organizational policies and procedures e.g. process standards used, implementation requirements, etc. External requirements Requirements which arise from factors which are external to the system and its development process e.g. interoperability requirements, legislative requirements, etc. These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 20 Non­Functional Requirement Examples Product requirement Organizational requirement 4.C.8 It shall be possible for all necessary communication between the APSE and the user to be expressed in the standard Ada character set. 9.3.2 The system development process and deliverable documents shall conform to the process and deliverables defined in XYZCo­SP­STAN­95. External requirement 7.6.5 The system shall provide facilities that allow any user to check if personal data is maintained on the system. A procedure must be defined and supported in the software that will allow users to inspect personal data and to correct any errors in that data. These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 21 Requirements must be testable Requirements should be written so that they can be objectively verified The problem with this requirement is its use of vague terms such as ‘errors shall be minimized” The system should be easy to use by experienced controllers and should be organized in such a way that user errors are minimized. The error rate should be been quantified Experienced controllers should be able to use all the system functions after a total of two hours training. After this training, the average number of errors made by experienced users should not exceed two per day. These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 22 Requirements must be testable Pro perty Speed Size Ease of use Reliability Robu stness Portability Mea s ure Processed transactions/secon d User/Event respon se tim e Screen refresh tim e K Bytes Num ber of RAM chips Training tim e Num ber of help fram es Mean tim e to failure Probability of unavailability Rate of failure occurrence Availability Tim e to restart after failure Percentag e of events cau sin g failure Probability of data corruption on failure Percentag e of targ et depen den t statem ents Num ber of target system s These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 23 System Level Requirements Some requirements place constraints on the system as a whole rather than specific system functions Example The time required for training a system operator to be proficient in the use of the system must not exceed 2 working days. These may be emergent requirements which cannot be derived from any single sub­set of the system requirements These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 24 Requirements Validation Concerned with demonstrating that the requirements define the system that the customer really wants Requirements error costs are high so validation is very important Fixing a requirements error after delivery may cost up to 100 times the cost of fixing an implementation error Prototyping is an important technique of requirements validation These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 25 Validating Requirements­I Is each requirement consistent with the overall objective for the system/product? Work with all parties on this question! Have all requirements been specified at the proper level of abstraction? That is, do some requirements provide a level of technical detail that is inappropriate at this stage? Is the requirement really necessary or does it represent an add­on feature that may not be essential to the objective of the system? Is each requirement bounded and unambiguous? Does each requirement have attribution? That is, is a source (generally, a specific individual) noted for each requirement? Do any requirements conflict with other requirements? These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 26 Validating Requirements­II Is each requirement achievable in the technical environment that will house the system or product? Is each requirement testable, once implemented? Does the requirements model properly reflect the information, function and behavior of the system to be built. Has the requirements model been “partitioned” in a way that exposes progressively more detailed information about the system. Have requirements patterns been used to simplify the requirements model. Have all patterns been properly validated? Are all patterns consistent with customer requirements? These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 27 Requirements Reviews Regular reviews should be held while the requirements definition is being formulated Both client and contractor staff should be involved in reviews Reviews may be formal (with completed documents) or informal. Good communications between developers, customers and users can resolve problems at an early stage These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 28 Requirements Reviews Check Verifiability. Is the requirement realistically testable? Comprehensibility. Is the requirement properly understood? Traceability. Is the origin of the requirement clearly stated? Adaptability. Can the requirement be changed without a large impact on other requirements? These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 29 Quality Function Deployment Function deployment determines the “value” (as perceived by the customer) of each function required of the system Information deployment identifies data objects and events Task deployment examines the behavior of the system Value analysis determines the relative priority of requirements These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 30 ...
View Full Document

This note was uploaded on 03/26/2012 for the course CS 321 taught by Professor Kinga during the Spring '12 term at George Mason.

Ask a homework question - tutors are online