Upload
ashenafi-workie
View
511
Download
5
Tags:
Embed Size (px)
Citation preview
1
Use case DiagramUse case Diagram
Use case specificationUse case specificationUse case specificationUse case specification
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
USE CASE DIAGRAMUSE CASE DIAGRAM
System behavior is captured by use cases.
– Use cases describe the system, its environment,and the relationship between the system andits environment.its environment.
– “A use case diagram is a graphic representationof the key features of the written use casereports that comprise a system.”
(McLeod, Jordan)
What Is a Use-Case Model?• A model that describes a system’s functional
requirements in terms of use cases• Represents
– system’s intended functionality (use cases)and its environment (actors)
What Is an Actor?Actors are not part of the system.Actors representroles a user of the system can play. anything that interacts with the system a human, a machine, or system.
Actors are EXTERNAL.
a human, a machine, or system.They can actively interchange information
with the system.They can be a giver of information.They can be a passive recipient of
information. Actor
Who will supply, use, or remove information? Who will use this functionality? Who is interested in a certain requirement? Where in the organization is the system
Useful Questions in Finding Actors?Useful Questions in Finding Actors?
Actor Where in the organization is the system
used? What are the system’s external resources? What other systems will need to interact with
this one?
USEUSE CASECASE:: a sequence of actions asystem performs that yields anobservable result of value to aparticular actor. Use Case
Use Cases and ActorsUse Cases and Actors
A use case models a dialog between actors and thesystem. A use case is initiated by an actor toinvoke a certain functionality in the system.
QuestionsQuestions toto findfind useuse casescases..– For each actor you have identified,
what are the tasks the system wouldbe involved in?
– Does the actor need to be informedabout certain occurrences in theabout certain occurrences in thesystem?
– Will the actor need to inform thesystem about sudden, externalchanges?
– What information must be modified orcreated in the system?
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Brief Overview of Use Case Core Components and Structure
Brief Overview of Use Case Core Components and Structure
Relationship between Use-CaseRelationship between Use-Case
– Use the include relationship to showthat•the behavior of one use case is wholly and
unconditionally used in another use case
Perform Transaction
The Perform Transactionuse case includes the
Perform Transaction
Send Command Receive Response
Application «include» «include»
use case includes theprocessing specified byboth the Send Commandand Receive Responseuse cases.
Use Case Diagram Rules
• Use the generalizationgeneralization relationship to showthat– a use case is a specialization of another
use case
Run Applications Install Applications
User Super User
A User can Run Applications.A Super User can InstallApplications and RunApplications, since a SuperUser is a specialization ofUser.
• Use the extendextend relationship to show that
– one use case conditionally augment (orextend) the behavior of another usecase.
1. Actor2. Use case3. Association4. System Boundary
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
5. Include6. Extend7. Generalization8. Dependency9. Comment10. Artifact
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Types of Actors1. Initiating actor ( primary actor or “user”):
initiates the use case to realize a goal
2. Participating actor (Secondary actor):participates in the use case but does not initiateparticipates in the use case but does not initiateit:
3. Supporting actor:helps the system-to-be to complete the use case
4. Offstage actor: passively participates in theuse case, i.e., neither initiates nor helpscomplete the use case
Practice: Find the Actors• In the Course Registration System Requirements
document, read the Problem Statement for theCourse Registration case study.
• As a group, identify the following– Actors– Description of the actor
Use-Case Specifications• Name• Brief description• Flows of Events• Relationships• Activity diagrams
Use-Case Model
Actor• Activity diagrams• Use-Case diagrams• Special
requirements• Pre-conditions• Post-conditions• Other diagrams Use-Case Specifications
...
Actors Use
Cases
Brief Overview ofUse Case Core Components and Structure –
Use Case Description
Basic Structure and Components
• Use Case: Name• Brief Description
Additional Components• Special Requirements• Data Sources *
• Brief Description• Actors• Pre-Conditions• Post-Conditions• Basic Flow• Alternate Flows• Exception Flows
• Data Sources *• Dependencies• Assumptions• Open Issues
Scenarios..• Scenario: a set of actions performed to
achieve a goal under some conditions– Actions specified as a sequence of steps– A step is a logically complete action performed– A step is a logically complete action performed
either by the actor or the system
• Main success scenario – when things gonormally and the goal is achieved
• Alternate scenarios: When things go wrongand goals cannot be achieved
21
Example 1Use Case 1: Buy stocksPrimary Actor: PurchaserGoals of Stakeholders:
– Purchaser: wants to buy stocks– Company: wants full transaction info
Precondition: User already has an accountMain Success Scenario
Requirements 22
Main Success ScenarioUser selects to buy stocksSystem gets name of web site from user for tradingEstablishes connectionUser browses and buys stocksSystem intercepts responses from the site and updates
user portfolioSystem shows user new portfolio standing
Alternatives2a: System gives error message, asks for new
suggestion for site, gives option to cancel3a: Web failure.
1. Sys reports failure to user & backs up toprevious step.
2. User exits or tries again4a: Computer crashes4a: Computer crashes4b: web site does not acknowledge purchase5a: web site does not return needed info
Requirements 23
Example 2• Use Case 2: Buy a product• Primary actor: buyer/customer• Goal: purchase some product• Precondition: Customer is already logged in
Main ScenarioCustomer browses and selects itemsCustomer goes to checkout
Requirements 24
Customer goes to checkoutCustomer fills shipping optionsSystem presents full pricing infoCustomer fills credit card infoSystem authorizes purchaseSystem confirms saleSystem sends confirming email
Alternatives
6a: Credit card authorization failsAllows customer to reenter info
3a: Regular customerSystem displays last 4 digits of credit card
noAsks customer to OK it or change itMoves to step 6
Requirements 25
Student Assignment5 Marks
Submission Date:14 – Nov – 201414 – Nov – 2014
Friday
Analyze the given Use Case Diagram
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Answer the following questions1.Which use cases will a 1.5 Marks STUDENT be able to perform?
PROFESSOR be able to perform?
REGISTRAR be able to perform?
2.Identify 2 types of actors ? 0.5 Marks
3. Identify 2 types of relationships and write clearly3. Identify 2 types of relationships and write clearlywhich relationship between which elements 0.5 Marks
4. Which use case needs to run first, Register forCourses or View Report Card? 0.5 Marks
5. If Charlie is a student and professor, which usecases will he be able to execute 1 Mark
6. Describe the functionality of this system. 1 Mark
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill