Académique Documents
Professionnel Documents
Culture Documents
Use Case - 1
Objectives
Identify actors from a problem statement. Identify use cases from a problem statement. Learn how to create a use-case diagram that accurately models the system. Learn how to write use-case specification, glossary, and supplementary specification document.
Use Case - 2
Use Case - 3
Use Case - 4
Glossary Actors
Use Cases
...
Supplementary Specification Use-Case Specifications
Use Case - 5
Login
Minder Chen, 1994-2004 Use Case - 6
Use Case - 8
Use Case - 9
Source: http://www-106.ibm.com/developerworks/rational/library/content/RationalEdge/jul02/TopTenWaysJul02.pdf
Use Case - 10
Actor
Use Case
Use Case - 11
Used to identify
Used to verify
Use Case - 12
External hardware that the system uses Other systems interacting with the system
Use Case - 13
Actor
Use Case - 14
Professor
Student
Use Case - 15
Construct Description
use case A sequence of actions, including variants, that a system (or other entity) can perform, interacting with actors of the system. A coherent set of roles that users of use cases play when interacting with these use cases. Represents the boundary between the physical system and the actors who interact with the physical system.
Syntax
UseCaseName
actor
ActorName
system boundary
Use Case - 16
Construct
association
Description
Syntax
The participation of an actor in a use case. i.e., instance of an actor and instances of a use case communicate with each other. A relationship from an extension use extend case to a base use case, specifying how the behavior for the extension use case can be inserted into the behavior defined for the base use case. generalization A taxonomic relationship between a more general use case and a more specific use case.
<<extend>>
Use Case - 17
Construct
include Or use
Description
An relationship from a base use case to an inclusion use case, specifying how the behavior for the inclusion use case is inserted into the behavior defined for the base use case.
Syntax
<<include>>
Use Case - 18
Manager
Employee
{readOnly}
Use Case - 19
The university will require a new Course Registration system. At the beginning of each semester, professors at the university will register the courses that they are going to teach with the system. The system then will allow students to request a course catalogue containing a list of course offerings for the coming semester. Information about each course such as professor, department and prerequisites are included. The student then can select four-course offering. Once the registration process is completed for a student, the registration system sends information to the billing system so the student can be billed for the semester. For each semester, there is a period of time that students can change their schedule through adding or dropping courses. Professors must be able to access the system to indicate which courses they will be teaching and to see which students signed up for their course offerings.
Use Case - 20
Use Case - 21
Use Case - 22
MOT
After MOT
Use Case - 23
Practice: Solution
The external system responsible for student billing
Billing System
A person who is registered to take courses at the University The unabridged catalog of all courses offered by the University
Professor
Course Catalog
The person who is responsible for the maintenance of the course registration system
Registrar
Use Case - 24
Use Case - 26
Practice: Solution
Login
Submit Grades
Close Registration
Use Case - 27
a use case: . . .describes a sequence of actions, performed by a system, that yields a result of value to the user.
Use Case - 28
Concept: Communicate-Association
Use cases and actors interact by sending signals to one another. To indicate such interactions, use a communicate-association.
Actor
Communicate-Association
Use Case
Use Case - 29
Practice: Use Case and Actor Communication In the Course Registrations System Requirements document, read the Problem Statement for the Course Registration case study. As a group, using the actors and use cases identified in the earlier practice session, identify:
Communicate-associations between the actors and the use cases.
Use Case - 30
Student
Course Catalog
Login
Maintain Student Information Select Courses to Teach Registrar Professor
Submit Grades
Close Registration
Billing System
Use Case - 31
Develop a Library System Use Cases Exercise Identify actors Determine major use major use cases Draw a use case diagram
Use Case - 32
Use-Case Specifications
Name Brief description Flows of Events Relationships Activity diagrams Use-Case diagrams Special requirements Pre-conditions Post-conditions Other diagrams
Use-Case Model
...
Use-Case Specifications
Use Case - 33
Use Case Description: Change Flight Actors: traveler, client account db, airline reservation system Preconditions:
Traveler has logged on to the system and selected change flight itinerary option System retrieves travelers account and flight itinerary from client account database System asks traveler to select itinerary segment she wants to change; traveler selects itinerary segment. System asks traveler for new departure and destination information; traveler provides information. If flights are available then System displays transaction summary. If no flights are available then
Basic course
Alternative courses
Use Case - 34
Use Case - 35
Use Case - 36
Glossary
Course Registration System Glossary 1. Introduction
This document is used to define terminology specific to the problem domain, explaining terms, which may be unfamiliar to the reader of the use-case descriptions or other project documents. Often, this document can be used as an informal data dictionary, capturing data definitions so that use-case descriptions and other project documents can focus on what the system must do with the information.
2. Definitions
Glossary
The glossary contains the working definitions for the key concepts in the Course Registration System. 2.1 Course: A class offered by the university.
2.2 Course Offering: A specific delivery of the course for a specific semester you could run the same course in parallel sessions in the semester. Includes the days of the week and times it is offered. 2.3 Course Catalog: The unabridged catalog of all courses offered by the university.
Use Case - 37
Supplementary Specification
Functionality Usability Reliability Performance Supportability Design constraints
Supplementary Specification
Use Case - 38
Use Case - 39
Verify Actors
Have all the actors been identified? Is each actor involved with at least one use case? Is each actor really a role? Should any be merged or split? Do two actors play the same role in relation to a use case? Do the actors have intuitive and descriptive names? Can both users and customers understand the names?
Use Case - 40
Use Case - 41
Use Case - 42
Verify Glossary
Does each term have a clear and concise definition? Is each glossary term included somewhere in the usecase descriptions? Are terms used consistently in the brief descriptions of actors and use cases?
Use Case - 43
Use Case - 44
Reminders
Write something readable.
Casual, readable use cases are still useful whereas unreadable use cases wont get read. Precision Level 1: Primary actors name and goal Precision Level 2: The use case brief; or the main success scenario Precision Level 3: The extension conditions Precision Level 4: The extension handling steps Show a goal succeeding.
For data descriptions (only put Precision Level 1 into the use case text):
Precision Level 1: Data nickname Precision Level 2: Data fields associated with the nickname Precision Level 3: Field types, lengths, and validations
4. Capture the outermost summary use cases to see who really cares.
Check for an outermost use case for each primary actor.
5. Reconsider and revise the summary use cases. Add, subtract, or merge goals.
Double-check for time-based triggers and other events at the system boundary.
Continued
7. Capture stakeholders and interests, preconditions and guarantees.
The system will ensure the preconditions and guarantee the interests.
11. Extract complex flows to sub use cases; merge trivial sub use cases.
Extracting a sub use case is easy, but it adds cost to the project.
Review Questions
What are the main artifacts of requirements? What are the requirements artifacts used for? What is a use-case model? What is an actor? What is a use case? What is the difference between a scenario and a use case?
Use Case - 50
Exercise
Create a payroll system for restaurants and hotels. Make certain that the usual deductions are taken into consideration. The payroll must accommodate both salaried and hourly employees. The waiters are salaried employees, but the busboys are hourly employees. The payroll system must print checks weekly. The system will produce a payroll register which will be turned over to auditors monthly. Income and tax reports (such as W-2s* in the U.S.) must be prepared according to legal requirements. Reports concerning voluntary deductions will be prepared for various agencies on a quarterly basis. ? The payroll must treat part-time employees as hourly employees. Full-time employees and salaried employees may take advantage of the various company benefits, part-time employees may not. Restaurant employees will be able to eat meals at their restaurant but will have the cost of the meals deducted from their paycheck. Hotel employees will have room costs deducted if they live in the hotel. There are voluntary deductions and mandatory government deductions that must be taken into account. *W-2 = U.S. annual income statement
Minder Chen, 1994-2004 Use Case - 51
Exercise
Identify for the Payroll System
Actors Use cases
Name the use cases Produce the use-case model for the Payroll System. Provide:
Actor descriptions Brief use-case descriptions
Telephone Catalog
Check status
Place order
Salesperson
Supervisor
Arrange Payment
include
include
include
Place Order
1 * Extension points additional requests :
after creation of the order
extend
the salesperson asks for the catalog
Request Catalog
Use Case - 54
Actor Relationships
Place Order
Salesperson
Establish Credit
Supervisor
Use Case - 55
<<include>>
<<include>>
<<include>>
Update Benefits
______________ Extension points benefit options: after required enrollments <<extend>> employee requests reimbursement option Elect Reimbursement for Healthcare extension point name and location <<extend>> employee requests stock purchase option Elect Stock Purchase
Employee
extension condition
Use Case - 56
Actors: employee, employee account db, healthcare plan system, insurance plan system Preconditions: Employee has logged on to the system and selected "update benefits" option Basic course System retrieves employee account from employee account db System asks employee to select medical plan type; include Update Medical Plan. System asks employee to select dental plan type; include Update Dental Plan. Alternative courses If health plan is not available in the employees area the employee is informed and asked to select another plan... Use Case - 57 Minder Chen, 1994-2004
When to model use cases Model user requirements with use cases. Model test scenarios with use cases. If you are using a use-case driven method
start with use cases and derive your structural and behavioral models from it.
Use Case - 58
If the usage is required use <<includes>> or <<uses>> If the base use case is complete and the usage may be optional, consider use <<extends>>
A use case diagram should
contain only use cases at the same level of abstraction include only actors who are required
Use Case - 60
Use Case - 61
Use Case - 62
OPS
Place order ___________ Handle Rush Order extends uses Handle Rush Order Manage inventory
Log in uses Administration Login Track shipment Customer Manage Shipment Order Operation Clerk
Use Case - 63
Use Case - 64
Model Explorer
Use Case - 65
Requirements
Brief Summary of Requirements: The ATM is required: 1. To allow authorized card holders to make transactions
1. Card holders shall view and/or print account balances 2. Card holder shall make cash withdrawals 3. Card holder shall make cash or check deposits 4. Card holder shall quit session
4. To keep track of how much money it contains and alert bank staff when stocks are getting low.
Use Case - 67
Exercise Requirements
Identify the actors Identify the uses cases Draw the top level Use-Case diagram Develop a detailed Use-Case analysis for a use case. Your analysis should contain a brief description of the use case, the basic and alternative flows, pre and post conditions.
Use Case - 68
Use Case - 69
Context of a System
The whole is more than the sum of the parts The whole determines the sum of the parts The parts cannot be understood if considered in isolation from the whole The parts are dynamically interrelated and interdependent
-- Fredrick Hagel (1770-1831)
Use Case - 70