Yazd University, Electrical and Computer Engineering Department Course Title: Advanced Software Engineering By: Mohammad Ali Zare Chahooki How to Write.

Slides:



Advertisements
Similar presentations
Use-Cases.
Advertisements

Withdrawal Transaction Use Case Primary Actor: Customer Pre-conditions: The customer must have a valid ATM card and PIN. Post-conditions: The customer.
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Information System Engineering
7 th Grade Language Arts. Choose your topic  In some circumstances, especially when you are given a particular essay writing assignment, your topic may.
Assignment I, part 1. Groups of three students. Specify one as group leader. group names to TA and me. Create an object-oriented conceptualization.
CS3773 Software Engineering Lecture 03 UML Use Cases.
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.
Introduction to Software Engineering
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Use Cases & Requirements Analysis By: Mostafa Elbarbary.
Object Oriented Analysis Process
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
Use Case Analysis – continued
Object-Oriented Development Process Part I: Requirement Gathering Warsun Najib Department of Electrical Engineering Gadjah Mada University.
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.
Use Cases Why use ‘em? How do they work? UC diagrams Using them later in the software development cycle.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
CS499 Use Cases References From Alistair Cockburn Writing Effective Use Cases (Book) - Use Case.
Object-Oriented Analysis - Instructor Notes
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
المحاضرة الثالثة. Software Requirements Topics covered Functional and non-functional requirements User requirements System requirements Interface specification.
Developing Use Cases in a Group Carolyn L. Cukierman Face-to-Face Technology Conference March 27, 2000.
Intro: Use Case and Use Case Diagram Documentation.
Interaction Modeling Interaction model describes how objects interact to produce useful results. Interactions can be modeled at different levels of abstraction:
Requirements Management with Use Cases Module 2: Introduction to RMUC Requirements Management with Use Cases Module 2: Introduction to RMUC.
Yazd University, Electrical and Computer Engineering Department Course Title: Advanced Software Engineering By: Mohammad Ali Zare Chahooki The Rational.
10/12/ Recall The Team Skills 1. Analyzing the Problem (with 5 steps) 2. Understanding User and Stakeholder Needs 1. Interviews & questionnaires.
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.
Requirements Artifacts Precursor to A & D. Objectives: Requirements Overview  Understand the basic Requirements concepts and how they affect Analysis.
Requirements Analysis via Use Cases SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
 Development is organized in a series of short, fixed-length mini-projects called iterations  Iterations are also incremental  Successive enlargement.
Chapter 7 Software Engineering Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Requirements Reference: Chapters 5, 6, & 8. CMSC 345, Fall Objectives To introduce the concepts of user and system requirements To explain functional.
Rational Requirements Management with Use Cases v5.5 Copyright © Rational Software, all rights reserved 1 Requirements Management with Use Cases.
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.
Yarmouk University Department of Computer Information Systems CIS 499 Yarmouk University Department of Computer Information Systems CIS 499 Yarmouk University.
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.
Use Case Diagram The purpose is to communicate the system’s functionality and behaviour to the customer or end user. Mainly used for capturing user requirements.
Behavior Modeling (based on Alistair Cockburn book) PA116 – L11 (c) Zdenko Staníček, Sept 2010.
1 Chapter 5 Modeling System Requirements Finding the Use Cases Page
By Germaine Cheung Hong Kong Computer Institute
Requirements specification Why is this the first major stage of software development? –Need to understand what customer wants first Goal of requirements.
Scenario A scenario is a sequence of steps describing an interaction between a user and a system. Use case is a set of scenarios tied together by a common.
CMSC 345 Use Cases. u Describes the system’s behavior under various conditions as the system responds to a request from one of the stakeholders, called.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
1 What is the Software Life Cycle? The stages of developing a software application Requirements Analysis High-level Design Plan Low-level Design Implementation.
UML (Unified Modeling Language)
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
User Stories- 2 Advanced Software Engineering Dr Nuha El-Khalili.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
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.
Pepper modifying Sommerville's Book slides
Use Case Analysis Chapter 6.
CMPE 280 Web UI Design and Development August 29 Class Meeting
Use Cases Discuss the what and how of use cases: Basics Benefits
Recall The Team Skills Analyzing the Problem (with 5 steps)
Storyboarding and Game Design SBG, MBG620 Full Sail University
Algorithms and Problem Solving
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Applying Use Cases (Chapters 25,26)
Applying Use Cases (Chapters 25,26)
How to Write Effective Use Cases
The Software Development Cycle
Use cases Dr. X.
Presentation transcript:

Yazd University, Electrical and Computer Engineering Department Course Title: Advanced Software Engineering By: Mohammad Ali Zare Chahooki How to Write Effective Use Cases

 A use case captures a contract between the stakeholders of a system about its behavior.  The use case describes the system’s behavior under various conditions as it responds to … a request from one of the stakeholders, called the primary actor. What is a Use Case (more or less)?

 The primary actor  initiates an interaction with the system to  accomplish some goal.  Different sequences of behavior, or scenarios, can unfold,  depending on the particular requests made and  conditions surrounding the requests.  The use case collects together those different scenarios. What is a Use Case (more or less)?

 Use cases are  fundamentally a text form, although  they can be written using  flow charts,  sequence charts,  Petri nets, or  programming languages. What is a Use Case (more or less)?

 Under normal circumstances,  they serve to communicate from one person to another,  often to people with no special training.  Simple text is, therefore, usually the best choice. What is a Use Case (more or less)? 1

 The use case can be used for: 1) discussion within a team about an upcoming system. 2) They might later used to document the actual requirements. 3) Another team might later document the final design with the same use case form. What is a Use Case (more or less)?

 They might do this for  a system as large as an entire company, or  as small as a piece of a software application program. What is a Use Case (more or less)?

 The primary actor is the one with the goal that the use case addresses.  Scope identifies the system that we are discussing,  The preconditions and guarantees say what must be true before and after the use case runs. What is a Use Case (more or less)?

 The main success scenario is a case in which nothing goes wrong.  The extensions section describes what can happen differently during that scenario.  The numbers in the extensions refer to the step numbers in the main success scenario at which each different situation gets detected (for instance, steps 4a and 4b indicate two different conditions that could show up at step 4). What is a Use Case (more or less)? 6

 When a use case references another use case, the second use case is written in italics or underlined. What is a Use Case (more or less)? 7

 Use cases are popular largely because:  they tell coherent stories about how the system will behave in use.  The users of the system get to see just what this new system will be.  They get to react early, to fine-tune or reject the stories ("You mean we’ll have to do what?").  That is, however, only one of ways they contribute value, and possibly not the greatest. When Use Cases Add Value

 The first moment at which they create value is when they are named as user goals  that the system will support and collected into a list.  That list of goals announces what the system will do.  It reveals the scope of the system, its purpose in life.  It becomes a communication device between the different stakeholders on the project. When Use Cases Add Value

 List of uses cases will be examined:  by user representatives,  executives,  expert developers, and  project managers. They will : estimate the cost and complexity of the system. negotiate over which functions get built first how the teams are to be set up. collects diverse information over the life of the project. When Use Cases Add Value

 The second particularly valuable moment is when  the use case writers brainstorm all the things that could go wrong in the successful scenario,  list them, and  begin documenting how the system should respond.  At that moment, they are likely to uncover something surprising …  something that they or their requirements givers had not thought about. When Use Cases Add Value

 Without the discrete use case steps and failure brainstorming activity,  many error conditions stay undetected until some programmer discovers them while in the middle of typing a code fragment.  That is very late to be discovering new functions and business rules.  The business experts usually are gone,  time is pressing, and so  the programmers type whatever they think up at the moment, instead of researching the desired behavior. When Use Cases Add Value

 Save your energy. Or at least, manage it.  If you start writing all the details at the first sitting,  you won't move from topic to topic in a timely way.  If you write down just an outline to start with, and  then write just the essence of each use case next, then you can:  Give your stakeholders a chance to offer correction and insight about priorities early, and  Permit the work to be split across multiple groups, increasing parallelism and productivity. Manage Your Energy

 People often say,  "Give me the 50,000 foot view," or  "Give me just a sketch," or  "We'll add details later."  They are saying, "Work at low precision for the moment, we can add precision later." Manage Your Energy

 When you say, "A 'Customer' will want to rent a video",  you are not saying very many words, but  you actually communicate a great deal to your readers.  When you show a list of all the goals that your proposed system will support,  you have given your stakeholders an enormous amount of information from a small set of words. Manage Your Energy

Manage Your Energy

The energy of writing use cases is divided into four stages: 1- Actors & Goals.  List what actors and which of their goals the system will support.  Review this list, for accuracy and completeness.  Prioritize and assign to teams and releases.  You now have the functional requirements to the first level of precision. Manage Your Energy 8 9

2- Use case brief or main success scenario  For the use cases you have selected to pursue,  write the trigger and  sketch the main success scenario.  Review these Manage Your Energy 10

3- Failure conditions  Complete the main success scenario and  brainstorm all the failures that could occur.  Draft this list completely before working out how the system must handle them all.  Filling in the failure handling takes much more energy than listing the failures.  People who start writing the failure handling immediately often run out of energy before listing all the failure conditions. Manage Your Energy 11

4- Failure handling  Finally, write how the system is supposed to respond to each failure.  This is often tricky, and surprising work.  It is surprising because, quite often, a question about an ambiguous business rule will surface during this writing.  Or the failure handling will suddenly reveal a new actor or a new goal that needs to be supported. Manage Your Energy 12

Most projects are short on time and energy. I strongly recommend working in the order given above. Manage Your Energy

 A usage narrative is a situated example of the use case in operation  a single, highly specific example of an actor using the system.  It is not a use case, and in most projects it does not survive into the official requirements document.  However, it is a very useful device, worth my describing, and worth your writing. Warm up with a Usage Narrative 13

 In this narrative:  invent a fictional but specific actor,  and capture, briefly, the mental state of that person,  why they want  what they want or  what conditions drive them to act as they do. Warm up with a Usage Narrative 14 15

 Brevity is important, so the reader can get the story at a glance.  Details and motives, or emotional content, are important so that every reader, from the requirements validator to the software designer, test writer and training materials writer, can see how the system should be optimized to add value to the user. Warm up with a Usage Narrative 16 17

Example: USAGE NARRATIVE: GETTING "FAST CASH" Mary, taking her two daughters to the day care on the way to work, drives up to the ATM, runs her card across the card reader, enters her PIN code, selects FAST CASH, and enters $35 as the amount. The ATM issues a $20 and three $5 bills, plus a receipt showing her account balance after the $35 is debited. The ATM resets its screens after each transaction with FAST CASH, so that Mary can drive away and not worry that the next driver will have access to her account. Mary likes FAST CASH because it avoids the many questions that slow down the interaction. She comes to this particular ATM because it issues $5 bills, which she uses to pay the day care, and she doesn't have to get out of her car to use it. Warm up with a Usage Narrative

 The narratives take little energy to write,  little space, and  lead the reader into the use case itself easily Warm up with a Usage Narrative