15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 USE CASES In this lecture: Use cases - What are use cases? - Why to use use cases? - How to write.

Slides:



Advertisements
Similar presentations
Ver 1,12/09/2012Kode :CIA-230 Anal-Perc.SistemFASILKOM PERTEMUAN-4 Chapter 4. Use Case Analysis.
Advertisements

10 Software Engineering Foundations of Computer Science ã Cengage Learning.
Software Engineering 2003 Jyrki Nummenmaa 1 A BASIC OO SOFTWARE DEVELOPMENT PROCESS Earlier, we saw a number of different software lifecycle models.
Karolina Muszyńska Based on:
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
Information System Engineering
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Chapter 15: System Modeling with UML
Introduction To System Analysis and Design
Use-case Modeling.
Systems Analysis and Design in a Changing World, Fourth Edition
Documenting Requirements using Use Case Diagrams
Functional Requirements – Use Cases Sriram Mohan/Steve Chenoweth (Chapters 14, 21 – Requirements Text) 1.
SwE 313 Introduction to Rational Unified Process (RUP)
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Functional Requirements – Use Cases Steve Chenoweth & Chandan Rupakheti (Chapters 14, 21 – Requirements Text)  Quiz question 9 relates to this, when you’ve.
Software engineering Olli Alm Lecture 2: requirements, modelling & representation.
Use Case Analysis – continued
Introductory case study. 2 The problem The most difficult part of any design project is understanding the task you are attempting You have been contacted.
Software Engineering Case Study Slide 1 Introductory case study.
Chapter 3 Object-Oriented Analysis of Library Management System(LMS)
CMPT 275 Software Engineering
Chapter 7: The Object-Oriented Approach to Requirements
USE Case Model.
Introduction To System Analysis and design
Use Case What is it?. Basic Definition Of who can do what within a system? TemplateDiagramModelDescription.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
Software Engineering – University of Tampere, CS DepartmentJyrki Nummenmaa USE CASES In this lecture: Use cases - What are use.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Chapter 8 Architecture Analysis. 8 – Architecture Analysis 8.1 Analysis Techniques 8.2 Quantitative Analysis  Performance Views  Performance.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
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.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Object-Oriented Analysis and Design Fall 2009.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
UML-1 3. Capturing Requirements and Use Case Model.
UML Use Case Diagramming Guidelines. What is UML? The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
UML-1 8. Capturing Requirements and Use Case Model.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 1: Introduction to Use-Case Modeling.
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 Use Case Diagrams Use Case Actor Use case description Use case realization (Scenario) Use case relationships –Extends –Uses.
Use Cases, Part I Understanding the Business Dynamics  Understand the business workflow  Identify system support points the system 'use cases'
TAL7011 – Lecture 4 UML for Architecture Modeling.
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.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
1 Version /05/2004 © 2004 Robert Oshana Requirements Engineering Use cases.
SYS466 Casual Use Case Specifications. Systems Use Case Diagrams and Specifications Based on the dialog metaphor Based on the dialog metaphor The process.
System sequence diagrams
Object-Oriented Analysis and Design with the Unified Process by Şensev Alicik.
Use Cases CS 6961 – Lecture 4 Nathan Dykman. Neumont UniversityCS Lecture 102 Administration Homework 1 is due –Still reviewing the proposal, but.
Systems Analysis and Design in a Changing World, Fourth Edition
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
UML (Unified Modeling Language)
UML - Development Process 1 Software Development Process Using UML.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
1 Use Cases Object-Oriented Modeling and Design with UML (Second Edition) Blaha & Rumbaugh Sections 7.1, 8.1.
Systems Analysis and Design in a Changing World, Fourth Edition
Use Case Modeling - II Lecture # 27.
System sequence diagrams
Object-Oriented Analysis Principles using UML
Unified Modeling Language
Software Design Lecture : 15.
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
SOFTWARE ENGINEERING LECTURE 4
Presentation transcript:

Software Engineering 2003 Jyrki Nummenmaa 1 USE CASES In this lecture: Use cases - What are use cases? - Why to use use cases? - How to write use cases? - What use cases are good for?

Software Engineering 2003 Jyrki Nummenmaa 2 Use Cases - Why? The users are usually not able to produce sufficient formal descriptions of the functionalities. A simple list of the required functionalities is not good enough. The informal general description by the users hardly does the job, either. The users may be able to describe by examples how they would want to use the system or how they perform certain tasks.

Software Engineering 2003 Jyrki Nummenmaa 3 An Example: Raising A Salary ”The user finds the salary data of the employee whose salary is to be raised. The user chooses the ”raise salary” functionality. The system raises a dialogue into which the user types the percentage and commits the raise.” It may be possible to specify preconditions and postconditions and exceptions to the processing of a use case. The example above had none of them.

Software Engineering 2003 Jyrki Nummenmaa 4 A Definition ”When a user uses the system, she or he will perform a behaviourally related sequence of transactions in a dialogue with the system. We call such a special sequence a use case.” … ”A use case is a sequence of transactions in a system whose task is to yield a measurable value to an individual actor of the system.” (I. Jacobsen) –The word ”transaction” does not mean exactly the same as the technical term ”transaction” in database terminology. A use case is a story about the usage of the system told from an end user’s perspective.

Software Engineering 2003 Jyrki Nummenmaa 5 Elements Of A Use Case (1/2) Use Case Name - identifies the use case Version Summary - What is it all about? Frequencey - How often the use case is performed? Usability Requirements - The most important aspects ensuring that the use case can be performed safely and efficiently Actors - The role of the people and other systems interacting with the system - to be continued …

Software Engineering 2003 Jyrki Nummenmaa 6 Elements Of A Use Case (2/2) Preconditions - When can the use case take place? - can be another use case Description – The story! Exceptions Illustrations Postconditions - Conditions which must hold after the use case

Software Engineering 2003 Jyrki Nummenmaa 7 Example Revisited (1/3) Name: SalaryRaise Version: 0.9 Summary: User raises an employees salary Frequencey: 5 times per day Usability Requirements: Actors: The user, the employee database Preconditions: The user has the rights to search and modify the employees salary data.

Software Engineering 2003 Jyrki Nummenmaa 8 Example Revisited (2/3) Description: The user finds the salary data of the employee whose salary is to be raised by employee number. [Exception: Employee not found] The user chooses the ”raise salary” functionality.[Exception: No rights to raise salary] The system raises a dialogue into which the user types the percentage and commits the raise [Exception: Maximum salary exceeded]

Software Engineering 2003 Jyrki Nummenmaa 9 Example Revisited (3/3) Exceptions: - Employee not found: Raised if no employee data can be found with the given number. Error information is shown. - No rights to raise the salary. Raised if the user has no rights to update salary data for this employee. Error information is shown. - Maximum salary exceeded: …

Software Engineering 2003 Jyrki Nummenmaa 10 What Can Use Cases Be Used For? To give concrete examples of the things we are supposed to be implementing. To give more flesh to the requirements specifications. As a source for analysis phase As input for the user’s guide As the basis for system testing

Software Engineering 2003 Jyrki Nummenmaa 11 UML We will use UML (Unified Modelling Language) in object-oriented modelling in this course. I will introduce some of the diagrams when they are first needed. There will also be a lecture to cover the rest. UML is a collection of modelling languages. They are not all meant to be used together. Instead, a suitable set of languages should be chosen.

Software Engineering 2003 Jyrki Nummenmaa 12 UML Use Case Diagram A use case diagram represents use cases and the participating actors external to the system. A use case may also include (use) another use case – this is represented as an arrow. If a use case diagram gets too large, it may be divided into logical collections of use cases.

Software Engineering 2003 Jyrki Nummenmaa 13 Raise a salary User Salary system The Salary Raise Example

Software Engineering 2003 Jyrki Nummenmaa 14 Booking Returning Service Customer Official > Vehicle rental system Using A Larger Example

Software Engineering 2003 Jyrki Nummenmaa 15 Use Cases As A Part Of The Requirements Specification Use cases should specify the most important functional requirements For each functionality specified in the requirements there should be one or more use cases. In principle, the use cases are used to clarify the functional specifications and to show how different functional specifications relate to each other. However, by reading through the use cases it may be possible to identify system components (hardware and software) which have been neglected in the requirements specification.

Software Engineering 2003 Jyrki Nummenmaa 16 What Should Be Chosen As A Use Case? Meaningful for implementation Valuable for the user (or customer) as such Too broad use cases are either too complex to understand or too vague to be useful. Too narrow use cases are either too detailed or describe fairly trivial events.

Software Engineering 2003 Jyrki Nummenmaa 17 A Use Case Is Just An Example A use case depicts a typical way of using the system - but nothing more. The use cases are not meant to describe all ways to peform one task. Other ways can be described in other use cases or in the ”Exceptions” section. A software designer may easily try to cover every possibility in the story. This is not meant to be done here.

Software Engineering 2003 Jyrki Nummenmaa 18 Stylistic Issues For Use Cases Try to read the use case through – if you get stuck, the use case is probably too vague. A use case should be a complete story, which starts from somewhere and ends up somewhere. It must make clear how and when it starts and how and when it finishes. A use case should have an explicit flow of actions: ”I took the pizza from the fridge and put it in the microwave. I set the time to 2 minutes and put it on. When it was ready I took it out and ate it.”

Software Engineering 2003 Jyrki Nummenmaa 19 More Stylistic Issues A use case must be simple and straightforward It must be so explicit that it can be argued about. If nobody disagrees with the first version of a use case, it is probably too vague.

Software Engineering 2003 Jyrki Nummenmaa 20 How Long Should A Use Case Be? A rule of thumb: It is usually good if the use case fits in one page. Long use cases are hard to understand. They may be too detailed or they try to cover too much functionality. In the latter case you may be able to break up the use case into several use cases.

Software Engineering 2003 Jyrki Nummenmaa 21 How To Find The Use Cases? You (as the analyst) are not supposed to invent them, as they express the way the users intent to do things. So, you must identify the functionalities and talk with the users. Use cases are simple, the users should be able to provide you with the stories. You can discuss these stories and try to find out if things could/should be done differently. The use cases can be refined and modified later, but it will produce extra work. Make enough use cases!