© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Use Cases Descriptions and Use Case Models.

Slides:



Advertisements
Similar presentations
IS0514Slide 1 IS0514 Lecture Week 4 Use Case Modelling (2)
Advertisements

Actors and use cases Use-case diagram Brief notation Prioritization Fully dressed notation Requirements Functional requirements  Use-cases.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Conversation Form l One path through a use case that emphasizes interactions between an actor and the system l Can show optional and repeated actions l.
Use-case Modeling.
Systems Analysis and Design in a Changing World, Fourth Edition
Use Case Analysis Chapter 6.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
1 CS 425 Software Engineering Project Preparation Use Case Modeling [Based on Chapters 3 & 4, Arlow and Neustadt, “UML and the Unified Process,” Addison-Wesley,
Use Cases.
Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A. Hoffer
Adding the Detail Filling in Use Case Templates. Use Case Template The use case diagram is important for visualizing a system and as a communication tool.
USE Case Model.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Context of Software Product Design.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Software Design Processes and Management.
Requirements Elicitation. Requirement: a feature or constraint that the system must satisfy Requirements Elicitation: specification of the system that.
RUP Requirements RUP Artifacts and Deliverables
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
Rational Unified Process (Part 1) CS3300 Fall 2015.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Design.
1 © 2005 course technology University Of Palestine Chapter 6 Storyboarding the User’s Experience.
1 Objectives  Describe design constraints.  Identify methods of specifying functional requirements.  Describe techniques for writing and structuring.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 A Discipline of Software Design.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Operation, Algorithm, and Data Structure Specification, and Design Finalization.
Interaction diagrams Sequence and collaboration diagrams.
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
© 2005 course technology1 1 1 University Of Palestine UML for The IT Business Analyst A practical guide to Object Oriented Requirement Gathering Hoard.
Requirements Artifacts Precursor to A & D. Objectives: Requirements Overview  Understand the basic Requirements concepts and how they affect Analysis.
UML Diagrams: Sequence Diagrams The Requirements Model, and The Dynamic Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Product Design Finalization; Inspections.
(Business) Process Centric Exchanges
 Development is organized in a series of short, fixed-length mini-projects called iterations  Iterations are also incremental  Successive enlargement.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Requirements Reference: Chapters 5, 6, & 8. CMSC 345, Fall Objectives To introduce the concepts of user and system requirements To explain functional.
Chapter 7 Appendix A Object-Oriented Analysis and Design: Use Cases Modern Systems Analysis and Design Seventh Edition Jeffrey A. Hoffer Joey F. George.
Requirements Analysis and Design Engineering Southern Methodist University CSE 7313.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Engineering Lab Use Cases Faculty of Information system Technology.
1 Structuring Systems Requirements Use Case Description and Diagrams.
CPSC 203. Use Case Diagram  A description of a system’s behavior as it responds to a request that originates from outside of that system. Specifies the.
Use Cases Use Cases are employed to describe the functionality or behavior of a system. Each use case describes a different capability that the system.
1 Version /05/2004 © 2004 Robert Oshana Requirements Engineering Use cases.
Behavior Modeling (based on Alistair Cockburn book) PA116 – L11 (c) Zdenko Staníček, Sept 2010.
Adv. Use cases Actor generalization – general and special actors Use case generalization – general and special use cases Include and extend relationships.
Rational Unified Process Fundamentals Module 3: Disciplines I.
Requirements and Use Cases
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL Requirement Engineering Virtusa Training Group 2004 Trainer: Ojitha Kumanayaka Duration : 1 hour.
Systems Analysis and Design in a Changing World, Fourth Edition
4-1 © Prentice Hall, 2007 Topic 4: Structuring Systems Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
® IBM Software Group © 2009 IBM Corporation Essentials of Modeling with the IBM Rational Software Architect, V7.5 Module 15: Traceability and Static Analysis.
Prof. Hany H. Ammar, CSEE, WVU, and
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Product Design Alternative Generation, Evaluation, and Selection.
Capturing Requirements. Questions to Ask about Requirements 1)Are the requirements correct? 2)Consistent? 3)Unambiguous? 4)Complete? 5)Feasible? 6)Relevant?
Refining the Use Cases 1. How Use Cases Evolve  Early efforts typically define most of the major use cases.  The refining stages complete the process.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
1 Team Skill 3 Defining the System Part 1: Use Case Modeling Noureddine Abbadeni Al-Ain University of Science and Technology College of Engineering and.
Use Cases Discuss the what and how of use cases: Basics Examples Benefits Parts Stages Guidelines.
Use Case Analysis Chapter 6.
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 7 Appendix A Object-Oriented Analysis and Design: Use Cases
CMPE 280 Web UI Design and Development August 29 Class Meeting
Systems Analysis and Design in a Changing World, 6th Edition
Use Cases Discuss the what and how of use cases: Basics Benefits
Use Cases and Use Case Diagrams
Concepts, Specifications, and Diagrams
Systems Analysis and Design in a Changing World, 6th Edition
Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A. Hoffer
Software Design Lecture : 15.
Use cases Dr. X.
Presentation transcript:

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Use Cases Descriptions and Use Case Models

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 2 Objectives  To explain what use case descriptions are  To specify the contents of use case descriptions  To present a use case description writing process  To present heuristics for use case descriptions  To explain the relationship between use cases and requirements  To explain what use case models are  To explain how to design with use case models  To outline how to use use cases in iterative development

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3 Topics  Use case descriptions, their formats, and their contents  Writing use case descriptions  Use case description heuristics  Use case descriptions and requirements  Use case models  Designing with use case models  Use-case-driven iterative development

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4 Use Case Descriptions A use case description is a specification of the interaction between a product and the actors in a use case.  What each party does  The order in which each party acts  All possible courses of interaction: complex activity flows

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 5 Use Case Description Contents 1  Use case name and number  Actors  Stakeholders and their needs  Preconditions—A precondition is an assertion that must be true when an activity or operation begins. Not checked by the use case  Postconditions—A postcondition is an assertion of what must be true when an activity or operation ends. Must satisfy stakeholder needs

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 6 Use Case Description Contents 2  Trigger—A trigger is an event that causes a use case to begin. May be the first step in the use case  Basic flow An action flow: a list of steps Documents a standard, successful interaction Begins at the trigger, continues until the use case ends  Extensions Alternative action flows May begin and end anywhere Extensions may have extensions

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 7 Car Wash Example – Part 1 Use Case 2: Activate/Deactivate Actors: Soap sensor Stakeholders and needs: Customers—Need their cars washed with soap, and want a complete wash Operations—Want the carwash to operate without constant attention Preconditions: None Postconditions: The carwash is active if and only if the soap sensor indicates that there is soap. No wash currently in progress is interrupted.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8 Car Wash Example – Part 2 Trigger: One minute has passed since the last time the soap sensor was checked. Basic Flow: 1.The carwash queries the soap sensor. 2.The soap sensor indicates that there is soap. 3.If the carwash is active, it continues its operation and the use case ends. Extensions: 1a: The carwash is unable to query the soap sensor: 1a1. The controller logs the problem and the use case ends.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9 Car Wash Example – Part 3 Extensions (continued): 2a: The soap sensor indicates that there is no more soap: 2a1. If the carwash is inactive, the use case ends. 2a2. If the carwash is active, the controller displays an out-of- order message and becomes inactive; the use case ends. 2b: The soap sensor does not respond: 2b1. The controller logs the problem. 2b2. If the carwash is inactive, the use case ends. 2b3. If the carwash is active, the controller displays an out-of- order message and becomes inactive; the use case ends. 2a2, 2b3: A wash is in progress: 2a21. The carwash completes the current wash, then displays an out-of-order message; the use case ends. 3a: The carwash is inactive: 3a1. The carwash becomes active and displays a ready message.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10 Use Case Description Formats  Many alternatives  “Fully-dressed” format  Underlined text refers to another use case.  Extensions use a special numbering scheme: Numbers are for action step sequencing; Letters are for extension triggers; Extension identifiers have interleaved numbers and letters; An asterisk refers to all action steps; A dash is used for ranges of action steps; A comma separates action steps in a list.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11 Use Case Description Template Use Case number: name Actors: actorList Stakeholders and Needs: stakeholder—needsList. … stakeholder—needsList. Preconditions: what is assumed at the start. Postconditions: what is guaranteed at the end. Trigger: the event that starts the use case. Basic Flow: # stepDescription … Extensions: extensionIdentifier condition: extensionIdentifier # stepDescription … …

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 12 Description Writing Process

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 13 Filling in the Initial Fields  Stakeholders are human use case actors or anyone with an interest to protect.  Only state things that really matter as use case preconditions.  Postconditions must be true when the use case ends whether it is successful or not.  The trigger is often the first step in the use case (but not always).

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 14 Writing the Basic Flow 1  Choose a common, simple activity flow.  Trace it from the trigger through use case completion.  Scenarios are often good resources.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 15 Writing the Basic Flow 2  Steps may assume the preconditions and should achieve the postconditions.  Each step should state an action of a single agent (the product or an actor).  Supplemental directions about conditions, iteration, or currency are allowed.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 16 Brainstorming Branch Points  A branch point is a place where the action flow may diverge.  Brainstorm a list of branch points and failure conditions. Look at scenarios for failed or alternative interactions. Consider errors, faults, and alternatives at every step. Don’t forget an actor’s failure to act.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 17 Rationalizing Branch Points  Remove from further considerations any conditions that the product Cannot detect Cannot do anything about  Rewrite poorly stated conditions

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 18 Writing Extensions  Treat an extension as if it were a separate use case: The condition is the trigger; Extension steps are the basic flow; Completing the use case or returning to the branch point are the goals.  Scenarios are a good resource.  Repeat the extension writing process for the extension (extensions may have extensions).

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 19 Use Case Description Heuristics 1  Fill in the use case template from top to bottom.  Obtain use case and actor names from the use case diagram.  Make human actors stakeholders whose needs include completion of the task done by the use case.  Write simple declarative sentences in the active voice.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 20 Use Case Description Heuristics 2  Make actors or the the product the subject of each step description.  Write a basic flow with three to nine steps.  Avoid sequences of steps by actors or the product.  Don’t specify physical details.  Impose minimal order on activities.  Proofread the description.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 21 Use Case Models  The diagram is a static model cataloging product interactions.  The descriptions are dynamic models detailing the interactions. A use case model is a use case diagram together with use case descriptions for each use case in the diagram.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 22 Designing with Use Case Diagrams  Models a design alternative for the interactions that a product will support  Generate several design alternatives  Alternative can be evaluated in terms of Unmet needs Extraneous features or capabilities Development costs Time and risk Conformance to constraints Feasibility, simplicity, beauty

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23 Designing with Use Case Descriptions  Use case descriptions refine the user-level specification in a use case diagram into operational-level specifications.  Design alternatives are specified in different descriptions.  Alternatives can be evaluated as already described.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 24 Requirements and Use Case Models  Use case models do not provide atomized requirements statements. They are not traceable; Some product functions may not appear; Data and non-functional requirements are not explicit.  Use case models sometime serve as surrogates for requirements.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 25 Extracting Requirements  Extracting requirements from use case models Helps designers understand their designs better; Helps find errors and improve designs; Produces a useful artifact for engineering design.  Additional requirements are also needed. Data and non-functional requirements Physical-level requirements

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 26 Use-Case-Driven Iterative Development In an iterative development project Choose several use cases for implementation in an iteration; Furnish product design details; Do engineering design, code, test, and (perhaps) deploy; Evaluate the result for the next iteration; Repeat these steps.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 27 Process Guidelines  Start with a complete use case diagram.  Choose use cases for each iteration according the the following criteria: Important to stakeholders Requires a core system function Requires the essentials of the system architecture The implementation is technically challenging

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 28 Summary  A use cases description is structured text that specifies the details of a use case.  Templates, processes, and heuristics guide use case description writers.  Use case descriptions, though not requirements, can be a source for them.  Use case diagrams and descriptions together form use case models.  These models are a powerful product design tool.  Use cases can drive iterative development.