Upload
clinton-stewart
View
213
Download
0
Embed Size (px)
Citation preview
310313310313 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE1
USE-CASE MODELING EXAMPLEUSE-CASE MODELING EXAMPLE
A video sales and rental shop would like to computerize its management of sales and rental of its movie videos. As well, it would like to establish a presence on the Web and allow its customers to rent and buy videos via the Web. Below are the high-level requirements for a system that will manage the sale and rental of videos for the video shop:– The system must be able to keep track of which movie videos have been
bought/rented and by whom. For videos bought, the system must record the quantity bought; for videos rented, the system must record which copy of the video has been rented and when it is due back.
– The system must keep track of overdue rental videos and allow notices to be sent to customers who have videos overdue.
– The video shop will have a customer membership option for an annual fee, which will entitle the member to discounts (10%) on video sales and rentals.
– Members should be able to make reservations for movie video rentals either in person at the store, by telephone or via the Web.
– A member can reserve at most five movie videos at any one time, but there is no limit on how many movie videos a member or nonmember can rent at any one time.
– As an added feature, the video shop would like to allow customers (either members or nonmembers) to input, via the Web, mini-reviews (up to 100 words)
310313310313 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE2
USE-CASE MODELING EXAMPLE (cont’d)USE-CASE MODELING EXAMPLE (cont’d)
and a rating (from 1, lowest, to 5, highest) of movies they have rented. These reviews should be anonymous if the customer so wishes (i.e., the customer can specify whether or not he wants his name to be made known when other customers browse the reviews).
– The video shop maintains the following information about all customers (members or nonmembers): name, address, phone number, fax number, age, sex, and email address. In addition, members are assigned a membership number by the video shop when they become members and a password, which allows them to access the members-only area of the video shop's web site, including accessing and changing their personal information.
– Using the Web, customers should be able to buy and rent videos and browse the reviews entered by other customers.
– Managers must be able to generate various reports on sales/rentals of videos.– Staff must be able to sell/rent videos from the store’s inventory and return rented
videos to the store's inventory.– When selling or renting videos, staff must be able to look up customer information
and determine whether the customer is a member.– An employee must be able to enter the basic information about a movie video
(i.e., title, leading actor(s), director, producer, genre, synopsis, release year, running time, selling price, and rental price).
310313310313 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE3
USE-CASE MODELING EXAMPLE — ANALYSISUSE-CASE MODELING EXAMPLE — ANALYSIS
We first analyze the functional requirements of the system and then present the use-case model. Note that for the purposes of producing the use-case model, we are only really interested in those functional requirements that provide something of value for some actor.
– The system must be able to keep track of which movie videos have been bought/rented and by whom.
functionality: Someone – bye a video
Someone – rent a video
– For videos bought, the system must record the quantity bought; for videos rented, the system must record which copy of the video has been rented and when it is due back.
functionality: None (this is mainly domain model information)
– The system must keep track of overdue rental videos and allow notices to be sent to customers who have videos overdue.functionality: Staff - produce rented video overdue notices
310313310313 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE4
USE-CASE MODELING EXAMPLE — ANALYSISUSE-CASE MODELING EXAMPLE — ANALYSIS
– The video shop will have a customer membership option for an annual fee, which will entitle the member to discounts (10%) on video sales and rentals.
functionality: Someone – enter member information. (The discount information is a nonfunctional requirement that
affects the operation of some use cases such as buying and selling videos.)
– Members should be able to make reservations for movie video rentals either in person at the store, by telephone or via the Web.functionality : Member - reserve a video Staff - reserve a video (Note that how the reservation is done is not important from a
functional perspective.)
– A member can reserve at most five movie videos at any one time, but there is no limit on how many movie videos a member or nonmember can rent at any one time.functionality: None. (This is a nonfunctional requirement—a domain
model constraint.)
310313310313 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE5
USE-CASE MODELING EXAMPLE — ANALYSISUSE-CASE MODELING EXAMPLE — ANALYSIS
– As an added feature, the video shop would like to allow customers (either members or nonmembers) to input, via the Web, mini-reviews (up to 100 words) and a rating (from 1, lowest, to 5, highest) of movies they have rented.
functionality: Customer - enter a review for a video
– These reviews should be anonymous if the customer so wishes (i.e., the customer can specify whether or not he wants his name to be made known when other customers browse the reviews).functionality: Elaborates preceding functional requirement
– The video shop maintains the following information about all customers (members or nonmembers): name, address, phone number, fax number, age, sex, and email address.
functionality: Staff - enter/update customer/member information (Note that this requirement is implicitly stated in that someone (i.e., the staff) has to enter the customer/ member information into the system.)
allow a member to update their personal information
310313310313 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE6
USE-CASE MODELING EXAMPLE — ANALYSISUSE-CASE MODELING EXAMPLE — ANALYSIS
– In addition, members are assigned a membership number by the video shop when they become members and a password, which allows them to access the members-only area of the video shop's web site, including accessing and changing their personal information.
– functionality: Memberf - update personal information
– Using the Web, customers should be able to buy and rent videos and browse the reviews entered by other customers.functional requirement: Customer - buy a video
Customer - rent a videoCustomer - browse video reviews
– Managers must be able to generate various reports on sales/rentals of videos.
functional requirement: Manager - generate reports
310313310313 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE7
USE-CASE MODELING EXAMPLE — ANALYSISUSE-CASE MODELING EXAMPLE — ANALYSIS
Staff must be able to sell/rent videos from the store’s inventory and return rented videos to the store's inventory.functionality: Staff - buy (sell) a video Staff - rent a video Staff - return a rented video
– When selling or renting videos, staff must be able to look up customer information and determine whether the customer is a member or not.functionality: Staff - lookup customer/member info
– An employee must be able to enter the basic information about a movie video (i.e., title, leading actor(s), director, producer, genre, synopsis, release year, running time, selling price, and rental price).
functionality: Staff - enter video information
310313310313 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE8
USE-CASE MODELING EXAMPLE — SOLUTIONUSE-CASE MODELING EXAMPLE — SOLUTION
Actors
Customer A customer is a person who uses the services of the video shop. A customer uses the system to
buy or rent videos or enter or browse reviews via the Web.
Member A member is a kind of customer. In addition to what a customer can do, a member can also use
the system to reserve videos and to access and change their personal information via the Web.
Staff Staff are employees of the video shop. Staff use the system to sell and rent videos, reserve
videos and enter and update video and customer/member information.
Manager A manager is a kind of staff. In addition to what staff can do, a manager can also generate various reports on
sales and rentals of videos.
310313310313 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE9
USE-CASE MODELING EXAMPLE — ANALYSISUSE-CASE MODELING EXAMPLE — ANALYSISCustomer - buy a videoStaff - sell (buy) a videoStaff - lookup customer information
Customer - rent a videoStaff - rent a videoStaff - return a rented videoStaff - produce rented video overdue noticesStaff - lookup customer information
Customer - enter a review for a videoCustomer - browse video reviews
Member - reserve a videoStaff - reserve a video
Staff - enter/update customer informationMember - update their personal information
Staff - enter video information
Manager - generate reports
Buy video
Rent video
Manage reviews
Reserve video
Manage customer info
Manage video info
Generate reports
310313310313 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE10
USE-CASE MODELING EXAMPLE — SOLUTIONUSE-CASE MODELING EXAMPLE — SOLUTION
Video Sales and Rentals System
Generate reports
Manage video info
Buy video
Rent video
Manage reviews
Manage customer info
Reserve video
Member
Customer
Manager
Staff
Buy video allows a customer (via the Web) or a staff (in the shop) to select a video and its quantity for purchase and staff to look up customer/member information .
Rent video allows a customer (via the Web) or staff (in the shop) to select a video for rental, staff to return rented videos and to look up customer/member information, and the system to record which copy of a video has been rented, keep track of overdue videos, and produce notices for customers with overdue videos.
Manage reviews allows a customer (via the Web) to browse video reviews or to input a review and rating for a selected video and to indicate whether the review is to be anonymous.
Reserve video allows a member (via the Web) or a staff (in the shop) to reserve up to 5 videos at a time for rental.
Manage customer info allows a member (via the Web) or a staff (in the shop) to enter or update personal customer/member information.
Manage video info allows staff (in the shop) to enter video information.
Generate reports allows a manager (in the shop) to generate various reports on sales and rentals of videos.
310313310313 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE11
- USE CASE MODELING EXAMPLE: COMMON ERRORS
System/devices/communication methods are not actors.
(e.g., web, phone, etc. represent how something is done)
Do not represent input/output devices as actors!
Too large use cases.
(e.g., Maintain video database)
Too small use cases.
Do not represent each operation as a use case!
Reuse the same functionality for different actors.
(e.g., Buy video Customer, Staff)
310313310313 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE12
- USE CASE MODELING EXAMPLE: COMMON ERRORS
Do not represent nonfunctional requirements.
(e.g., 10% discount)
- A use case model is not a structure chart!
- A use case model is not a domain model!
- A use case model is not a work of art!