Chapter 6 Structuring Systems Requirements Use Case Description

























- Slides: 25
Chapter 6: Structuring Systems Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A. Hoffer © Prentice Hall, 2004 6 -1
Chapter Objectives l After studying this chapter you should be able to: – Understand how to structure requirements with use case diagrams. – Explain the basics of use case construction using UML standards. – Construct use case diagrams. – Write text-based use cases. Chapter 6 © Prentice Hall, 2004 2
Chapter 6 © Prentice Hall, 2004 3
What Is Requirements Structuring? l The process of analyzing, organizing, and modeling the requirements obtained via interviews, questionnaires, observation, and document analysis l Relevant UML models include use cases, class diagrams, interaction diagrams, and activity or statechart diagrams Chapter 6 © Prentice Hall, 2004 4
Chapter 6 © Prentice Hall, 2004 5
Chapter 6 © Prentice Hall, 2004 6
UML Use Case Diagram Symbols l Use Case l Actor l Boundary l Connection <<include>> l Include l Extend Chapter 6 relationship © Prentice Hall, 2004 <<extend>> 7
What Is a Use Case? l. A depiction of a system’s behavior or functionality under various conditions as the system responds to requests from users l Full functioning for a specific business purpose Chapter 6 © Prentice Hall, 2004 8
What Is an Actor? • An external entity that interacts with the system • Most actors represent user roles, but actors can also be external systems. • An actor is a role, not a specific user; one user may play many roles, and an actor may represent many users. Chapter 6 © Prentice Hall, 2004 9
What Is a Boundary? l The dividing line between the system and its environment l- Use cases are within the boundary. l- Actors are outside of the boundary. Chapter 6 © Prentice Hall, 2004 10
What Is a Connection? l An association between an actor and a use case l Depicts a usage relationship l Connection Chapter 6 does not indicate data flow © Prentice Hall, 2004 11
What Is an <<include>> Relationship? l. A connection between two use cases l Indicates a use case that is used (invoked) by another use case l Links to general purpose functions, used by many other use cases Chapter 6 © Prentice Hall, 2004 12
Chapter 6 © Prentice Hall, 2004 13
What Is an <<extend>> Relationship? l. A connection between two use cases l Extends a use case by adding new behavior or actions l Specialized use case extends the general use case Chapter 6 © Prentice Hall, 2004 14
Chapter 6 © Prentice Hall, 2004 15
What Is a Stereotype • A construct that extends the UML vocabulary • Adds new meanings to existing entities • Depicted with << >> delimiters • <<extend>> and <<include>> are stereotypes Chapter 6 © Prentice Hall, 2004 16
Use Case Diagram in MS Visio Chapter 6 © Prentice Hall, 2004 17
Chapter 6 © Prentice Hall, 2004 18
Include vs. Extend l Use <<extend>> if you want to model an extension to, or a variation of, a complete use case that exists in its own right l Use <<include>> if you want to factor the common behavior among two or more use cases into a single generalized use case Chapter 6 © Prentice Hall, 2004 19
Actors can be grouped in generalization categories. Chapter 6 © Prentice Hall, 2004 20
Written Use Cases l Document containing detailed specifications for a use case l Contents can be written as simple text or in a specified format Chapter 6 © Prentice Hall, 2004 21
Sample Format for Written Use Case l Title – descriptive name, matches name in use case diagram l Primary actor – usually a user role l Stakeholders – any group or individual with an interest in the function of the use case l Precondition – conditions that must be satisfied in order to execute the use case Chapter 6 © Prentice Hall, 2004 22
Sample Format for Written Use Case (Continued) l l l Minimal guarantee – outputs that can be expected if the service attempt failed Success guarantee – outputs that can be expected if the service succeeds Trigger – an event or action that initiates the use case Main success scenario – description of sequence of interactions between actor and use case during the use case execution Extensions – detailed description of how errors are dealt with Chapter 6 © Prentice Hall, 2004 23
A sample written use case Chapter 6 © Prentice Hall, 2004 24
Recap l After to: studying this chapter we learned – Understand how to structure requirements with use case diagrams. – Explain the basics of use case construction using UML standards. – Construct use case diagrams. – Write text-based use cases. Chapter 6 © Prentice Hall, 2004 25