©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 Use Case Diagrams.

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design 1.
Advertisements

Requirements Elicitation and Use Case Diagrams
Use Case Diagrams.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Use-case Modeling.
Chapter 18 Object-Oriented Systems Analysis and Design Using UML
Systems Analysis and Design in a Changing World, Fourth Edition
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented design 2.
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Use Case Modeling.
03/12/2001 © Bennett, McRobb and Farmer Use Case Diagrams Based on Chapter 6 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
Unified Modeling Language
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
USE Case Model.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
Chapter 5 – System Modeling
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
CS 360 Lecture 6.  A model is a simplification of reality  We build models to better understand the system being developed.  We build models of complex.
©Ian Sommerville 1995/2000 (Modified by Spiros Mancoridis 1999) Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
 A software application is like a city  Modeling = Architecture  OOP = Civil Engineering  UML Classes = Blueprints of Buildings  UML is a common.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
UML Use Case Diagramming Guidelines. What is UML? The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
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.
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.
1 Structuring Systems Requirements Use Case Description and Diagrams.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
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.
1 Modeling System Requirements with Use Cases. 2 Why Do We Need Use Cases? Primary challenge in a system design process –ability to elicit correct and.
Software Engineering Software Engineering - Mr. Ahmad Al-Ghoul.
Systems Analysis and Design in a Changing World, Fourth Edition
New Perspective Based on how the system is used. What Is a Use Case? A case of how the system is used. –A behaviourally related sequence of interactions.
PRESENTATION ON USE CASE. Use Case Modeling Use case diagrams describe what a system does from the standpoint of an external observer. The emphasis is.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
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)
 What to do if you want to build a new house? › Buy a bunch of wood and nails and start immediately. › Or, put some blueprints to follow, and plan of.
Chapter 7 Part II Structuring System Process Requirements MIS 215 System Analysis and Design.
Lecture 5 Introduction to Use Case Analysis and the Analysis Model Introduction to the UML.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
Chapter 4 – System Modeling Lecture 1 1Chapter 5 System modeling.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
CompSci 280 S Introduction to Software Development
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 5 System modeling
The Movement To Objects
Lec-5 : Use Case Diagrams
Course Outcomes of Object Oriented Modeling Design (17630,C604)
M.M. Pickard, PhD A Primer on Use Cases (Reference: UML Superstructure Specification, v2.1.1)
System Modeling Chapter 4
Systems Analysis and Design With UML 2
Chapter 9 Use Cases.
Introduction to UML Week 4 Introduce myself.
Design and Implementation
Use Case Model Use case diagram – Part 2.
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Chapter 4 System Modeling.
Presentation transcript:

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 Use Case Diagrams

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 2 Slide 2 Use Cases l What is a Use Case  A formal way of representing how a business system interacts with its environment  Illustrates the activities that are performed by the users of the system  A scenario-based technique in the UML  A sequence of actions a system performs that yields a valuable result for a particular actor.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 3 Slide 3 Use Case Analysis l What is an Actor? A user or outside system that interacts with the system being designed in order to obtain some value from that interaction l Use Cases describe scenarios that describe the interaction between users of the system (the actor) and the system itself.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 4 Slide 4 Use Cases l Use case diagrams describe what a system does from the standpoint of an external observer. The emphasis is on what a system does rather than how. l Use case diagrams are closely connected to scenarios. A scenario is an example of what happens when someone interacts with the system.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 5 Slide 5 Use Cases l Here is a scenario for a medical clinic. l A patient calls the clinic to make an appointment for a yearly checkup. The receptionist finds the nearest empty time slot in the appointment book and schedules the appointment for that time slot. " l We want to write a use case for this scenario. l Remember: A use case is a summary of scenarios for a single task or goal.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 6 Slide 6 Use Cases l Step 1 Identify the actors l As we read the scenario, define those people or systems that are going to interact with the scenario. l A patient calls the clinic to make an appointment for a yearly checkup. The receptionist finds the nearest empty time slot in the appointment book and schedules the appointment for that time slot. "

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 7 Slide 7 Use Cases l Step 1 Identify the actors l As we read the scenario, define those people or systems that are going to interact with the scenario. l A patient calls the clinic to make an appointment for a yearly checkup. The receptionist finds the nearest empty time slot in the appointment book and schedules the appointment for that time slot. "

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 8 Slide 8 Questions for Identifying People Actors l Who is interested in the scenario/system? l Where in the organization is the scenario/system be used? l Who will benefit from the use of the scenario/system? l Who will supply the scenario/system with this information, use this information, and remove this information? l Does one person play several different roles? l Do several people play the same role?

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 9 Slide 9 Questions for Identifying Other Actors l What other entity is interested in the scenario/system? l What other entity will supply the scenario/system with this information, use this information, and remove this information? l Does the system use an external resource? l Does the system interact with a legacy system?

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 10 Slide 10 Actors l An Actor is outside or external the system. l It can be a : Human Peripheral device (hardware) External system or subsystem Time or time-based event l Represented by stick figure

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 11 Slide 11 Use Cases l A use case is a summary of scenarios for a single task or goal. l An actor is who or what initiates the events involved in the task of the use case. Actors are simply roles that people or objects play. l So as we read our scenario, what or who is the actor????

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 12 Slide 12 Use Cases l So as we read our scenario, what or who is the actor???? l A patient calls the clinic to make an appointment for a yearly checkup. The receptionist finds the nearest empty time slot in the appointment book and schedules the appointment for that time slot. " l The actor is a Patient.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 13 Slide 13 Use Cases l The use case is a summary of scenarios for a single task or goal. l So What is the Use Case???? l The Use Case is Make Appointment. l It is a use case for the medical clinic.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 14 Slide 14 Use Cases l The picture below is a Make Appointment use case for the medical clinic. l The actor is a Patient. The connection between actor and use case is a communication association (or communication for short). Actors are stick figures. Use cases are ovals. Communications are lines that link actors to use cases.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 15 Slide 15 Use Case Componentss l The use case has three components. l The use case task referred to as the use case that represents a feature needed in a software system. l The actor(s) who trigger the use case to activate. l The communication line to show how the actors communicate with the use case.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 16 Slide 16 Use Case Diagram - Use Case l A major process performed by the system that benefits an actor(s) in some way l Models a dialogue between an actor and the system l Represents the functionality provided by the system

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 17 Slide 17 Use Case l Each use case in a use case diagram describes one and only one function in which users interact with the system May contain several “paths” that a user can take while interacting with the system Each path is referred to as a scenario

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 18 Slide 18 Use Case l Labelled using a descriptive verb-noun phrase l Represented by an oval Make Appointment

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 19 Slide 19 Use Case - Actor l Labelled using a descriptive noun or phrase l Represented by a stick character

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 20 Slide 20 Use Case - Relationships l Relationships Represent communication between actor and use case Depicted by line or double-headed arrow line Also called association relationship Make Appointment

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 21 Slide 21 Use Case - Relationships l Boundary A boundary rectangle is placed around the perimeter of the system to show how the actors communicate with the system. Make Appointment

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 22 Slide 22 Use-Case Diagram A use case diagram is a collection of actors, use cases, and their communications.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 23 Slide 23 Use Case Diagram l Other Types of Relationships for Use Cases Generalization Include Extend

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 24 Slide 24 Components of Use Case Diagram l Generalization Relationship Represented by a line and a hollow arrow From child to parent Child use caseParent use case

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 25 Slide 25 Example of Relationships

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 26 Slide 26 Use Case Diagram l Include Relationship Represents the inclusion of the functionality of one use case within another Arrow is drawn from the base use case to the used use case Write > above arrowhead line

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 27 Slide 27 Use Case Diagram l Extend relationship Represents the extension of the use case to include optional functionality Arrow is drawn from the extension use case to the base use case Write > above arrowhead line

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 28 Slide 28 Example of Relationships

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 29 Slide 29 Use Case Relationships l Pro: Reduces redundancy in use cases Reduces complexity within a use case l Con May introduce complexity to use case diagram

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 30 Slide 30 Benefits of Use Cases l Use cases are the primary vehicle for requirements capture in RUP l Use cases are described using the language of the customer (language of the domain which is defined in the glossary) l Use cases provide a contractual delivery process (RUP is Use Case Driven) l Use cases provide an easily-understood communication mechanism l When requirements are traced, they make it difficult for requirements to fall through the cracks l Use cases provide a concise summary of what the system should do at an abstract (low modification cost) level.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 31 Slide 31 Difficulties with Use Cases l As functional decompositions, it is often difficult to make the transition from functional description to object description to class design l Reuse at the class level can be hindered by each developer “taking a Use Case and running with it”. Since UCs do not talk about classes, developers often wind up in a vacuum during object analysis, and can often wind up doing things their own way, making reuse difficult l Use Cases make stating non-functional requirements difficult (where do you say that X must execute at Y/sec?) l Testing functionality is straightforward, but unit testing the particular implementations and non-functional requirements is not obvious

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 32 Slide 32 Use Case Model Survey l The Use Case Model Survey is to illustrate, in graphical form, the universe of Use Cases that the system is contracted to deliver. l Each Use Case in the system appears in the Survey with a short description of its main function. Participants: Domain Expert Architect Analyst/Designer (Use Case author) Testing Engineer

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 33 Slide 33 Function versus Form Use casesArchitecture Use case specify function; architecture specifies form Use cases and architecture must be balanced

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 34 Slide 34 Sequence Diagrams A Sequence diagram shows how processes operate with one another and in what order.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 35 Slide 35 Actor

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 36 Slide 36 Alternative Combined Fragment

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 37 Slide 37 Message

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 38 Slide 38 Lifeline

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 39 Slide 39 Exercise

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 40 Slide 40 Exercise

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 41 Slide 41 Exercise