Use Cases CS/SWE 421 Introduction to Software Engineering Dan Fleck

Slides:



Advertisements
Similar presentations
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Use Cases CS/SWE 421 Introduction to Software.
Advertisements

CPSC 333: Foundations of Software EngineeringJ. Denzinger 2.2. Use Cases: Scenario based requirements modeling Recommended: Booch, Rumbaugh, Jacobson:
Use Case & Use Case Diagram
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Object-Oriented Analysis and Design
Chapter 18 Object-Oriented Systems Analysis and Design Using UML
Documenting Requirements using Use Case Diagrams
Unified Modeling Language 7/12/2015B.Ramamurthy1 The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson, and Jim Rumbaugh.
Use Case Modeling. Watch the video on use cases Review at minute 2:41-3:37.
Interaction Modeling. Introduction (1) Third leg of the modeling tripod. It describes interaction within a system. The class model describes the objects.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Use Cases CS/SWE 421 Introduction to Software.
Use Cases 1. Last week  Introduction to software engineering  How is it different from traditional engineering?  Introduction to specification  Operational.
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.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 Use Case Diagrams.
Copyright © 2013 Curt Hill UML Unified Modeling Language.
Use Case Model Use case diagram.
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.
Unified Modeling Language User Guide Section 4 - Basic Behavioral Modeling Chapter 16 - Use Cases Chapter 17 - Use Case Diagrams.
Use Case Model Use case diagram. Relevant Requirements Artifacts Use-Case Model Supplementary Specification Use-Case Specifications... Glossary Actors.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Use Cases CS/SWE 421 Introduction to Software.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Coming up: Unified Modeling Language Introduction.
Use Case Diagrams Lecture Oo14 Use Cases. References n Booch, et al, The Unified modeling Language User’s Guide, AWL, 1999, Chapt 16 & 17 n Fowler & Scott,
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Coming up: Unified Modeling Language Introduction.
1 BTS330 Visual Modeling. What is Visual Modeling? 2 Copyright © 1997 by Rational Software Corporation Computer System Business Process Order Item Ship.
Use Case, Component and Deployment Diagrams University of Sunderland.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Introduction to the Unified Modeling Language.
Use Cases. 2 A use case... –Specifies the behavior of a system or some subset of a system. –Is a system-level function. –Does not indicative how the specified.
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.
Engineering Quality Software Week02 J.N.Kotuba1 SYST Engineering Quality Software.
Chapter 5 – System Modeling
Pepper modifying Sommerville's Book slides
CompSci 280 S Introduction to Software Development
Using Use Case Diagrams
Chapter 5 System modeling
Chapter 5 – System Modeling
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Recall The Team Skills Analyzing the Problem (with 5 steps)
Introduction to the Unified Modeling Language
Architecture Concept Documents
Use Case Model.
Business Models Modeling.
Use Case Model Use case diagram.
Week 10: Object Modeling (1)Use Case Model
UML Use Case Diagrams.
System Modeling Chapter 4
Requirements: Use Case Models and Narratives
Unified Modeling Language
Use Cases CS/SWE 421 Introduction to Software Engineering Dan Fleck
Unified Modeling Language
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A. Hoffer
Chapter 9 Use Cases.
Use Cases.
Use Cases 1.
Introduction to the Unified Modeling Language
Introduction to the Unified Modeling Language
Software Design Lecture : 15.
Unified Modeling Language
Use Cases CS/SWE 421 Introduction to Software Engineering Dan Fleck
Use Case Model Use case diagram – Part 2.
Using Use Case Diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Interaction Modeling Extracted from textbook:
Use Cases CS/SWE 421 Introduction to Software Engineering Dan Fleck
Engineering Quality Software
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Chapter 4 System Modeling.
Week 8 Lecture 1: Identifying Actors and Activities
Use Cases CS/SWE 421 Introduction to Software Engineering Dan Fleck
Software Development Process Using UML Recap
Presentation transcript:

Use Cases CS/SWE 421 Introduction to Software Engineering Dan Fleck (Slides adapted from Dr. Stephen Clyde with permission) Additional information: http://www.rational.com/uml/resources.html Coming up: Introduction

Introduction Use Case: “... a typical interaction between a user and a computer system”, Booch Here, “user” is anything that needs or invokes the functionality of the system “Computer system” is the system being modeled Use cases can capture and document the user-visible functionality of a system Use cases capture how the system will benefit the user Each use case achieves a discrete goal for the user Examples of modeling languages: Data Flow Diagrams Entity Relationship Diagrams Flow Charts Context Diagrams State Charts Object-oriented Systems Modeling (OSM) The term model is actual a more appropriate term for what Booch, et al.m informal refer to as a modeling language. Coming up: Example Use Case Diagram

Example Use Case Diagram Coming up: Goals

Goals Use cases help everyone come to a common understanding of what the system should do Developers End-users Domain Experts Use-cases are a communication tool for the design (not the implementation) Use cases represent a functional requirement of your system (as a whole) Examples of modeling languages: Data Flow Diagrams Entity Relationship Diagrams Flow Charts Context Diagrams State Charts Object-oriented Systems Modeling (OSM) The term model is actual a more appropriate term for what Booch, et al.m informal refer to as a modeling language. Coming up: Use Case Diagrams

Use Case Diagrams Use Case Diagrams provide a visual way to document user goals and explore possible functionality Three primary modeling components: Actors Use Cases Relationships between use cases Record class grades Review Transcripts Teacher Student Authorized Staff Worker Coming up: Actors

Actors Actors are things outside the system that need to interact with the system Actors carry out use cases Actors are represented as stick figures Although users are actors, not all actors are users Actors can be external software systems External hardware (sensors, actuators, etc.) Actors can be people that need the functionality of the system, but may not be the ones who actually invoke the software commands Coming up: Hints for Finding Actors

Hints for Finding Actors Who or what will use the main functionality of the system? Who or what will provide input to this system? Who or what will use output from this system? Who will need support from the system to do their work? Are there any other software systems with which this one needs to interact Are there any hardware devices used or controlled by this system? Coming up: Hints for Modeling Actors

Hints for Modeling Actors An actor can be a role that a user plays with respect to the system A single person may play different roles A single actor may perform many use cases A use case may be performed by many actors Show external systems as actors only when they are the ones who need a use case Coming up: Relationships Between Actors

Relationships Between Actors Actors cam be related by generalization/specialization Actors are classifiers (not individual users) Student Do this when very obvious Graduate Student Coming up: Use Cases

Use Cases Each use case represents something the user needs to do with the system – a goal A use cases is given a short name and textual description Use cases can be large or small from a conceptual perspective Use cases can relate to each other via dependencies, such as <<extends>> <<includes>> Generalization or <<refines>> (“is a”) Validate User (General) --- Specialization: retinal scan, key-card scan Extends - Hire Employee --- Hire international employee Includes - process data --- login to system Coming up: Use Case Relationships

Use Case Relationships Includes Extends Generalization Validate User (General) --- Specialization: retinal scan, key-card scan Extends - Hire Employee --- Hire international employee Includes - process data --- login to system Extends adds functionality usually for abnormal case, generalization/specialization replaces functionality After a while you realize extends and generalization are not too different. Just know generalization and includes… forget about extends (the difference is only in intent) Coming up: Use-Case Relationships

Use-Case Relationships Includes Dependency: Defines how one use case can invoke behavior defined by another use case Alter Student Grade <<includes>> Record Grades for a Section Teacher Coming up: Use-Case Relationships

Use-Case Relationships Extends dependency: defines a use-case that is a variation of another, usually for handling an abnormal situation Alter Student Grade <<extends>> Alter student grade for a class taken more than a year ago Authorized Staff Worker Coming up: Use-Case Relations

Alter Student Grade for a Graduate Course Use-Case Relations Generalization: Defines one use case as a generalization of another. Alter Student Grade Alter Student Grade for a Graduate Course Teacher Coming up: Hints for Finding Use Cases

Hints for Finding Use Cases Try listing actors first and then look at the activities each needs to perform and then try to express the goal that represent these activities although this will uncover many valuable use cases, it will not find them all Try listing external events and then look at what the system needs to do in response to each one. This technique will find some additional use cases, but not all Be patient, allow the use cases to unfold Don’t over do it – Use Case Diagram should be broad-brush characterizations of user goals Coming up: Hints for Modeling Use Cases

Hints for Modeling Use Cases Establish the context of a user goal by identifying the actors For each actor, consider the behavior that it expects or requires the system to provide Name these common behaviors as use cases Factor common behavior into new use cases Relate the use cases using the extend, includes, and refines dependencies Adorn uses cases with notes Coming up: Benefits of Use Cases

Benefits of Use Cases Use cases diagrams capture user-visible functions Identifying actors help capture who needs the system functionality Relationships between use cases document opportunities for reuse Use cases provide a basis planning and scheduling incremental development Use cases can provide a basis for system testing Coming up: In Class Exercise

In Class Exercise Lets create a use case diagram for iPod Television set Elevator ATM Online Scrabble game Word Processor Coming up: Use cases for CS421

Use cases for CS421 Show system boundary Show Actors outside boundary Use extend, include, generalization/specialization where appropriate Typically one diagram for your project is sufficient Coming up: Use cases for CS421

Use cases for CS421 Show system boundary (Warning: skip this if not supported by the tool – like Netbeans!) Coming up: Use cases for CS421

Use cases for CS421 Use Case Description about slide #14 For each use-case (oval) in your diagram include the use-description text described in the slide for Chapter 5, titled: Use Case Description about slide #14 Coming up: Questions

Questions Who might be interested in reviewing or using use case diagrams? When in the development life cycle should we employ use cases? What do use cases have to do with object-orientation? What level of use-case granularity is best? How many use cases are enough? Can other modeling activities help in discovering use cases? When in the development life cycle do we stop referring to or refining the use cases? What should the text description of use case contain? Coming up:

The following slides were removed over time. Backup Slides The following slides were removed over time. Coming up: Extends vs. Includes vs. Generalization