9a748f6d6bb9d0a1e7856b02dcd8dfcb.ppt
- Количество слайдов: 10
USE-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) 310414 REQUIREMENTS CAPTURE 1
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). 310414 REQUIREMENTS CAPTURE 2
USE-CASE MODELING EXAMPLE — ANALYSIS We first analyze the functional requirements of the system and then present the usecase 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. 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. functional requirement: None. (These are nonfunctional requirements, i. e. , what information the system must be able to store—what video was bought/rented; who bought/rented a video; quantity bought; copy rented. ) – The system must keep track of overdue rental videos and allow notices to be sent to customers who have videos overdue. functional requirement: allow the system to detect overdue rented videos so that it can produce rented video overdue notices for staff to send to customers 310414 REQUIREMENTS CAPTURE 3
USE-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. functional requirement: None. (This 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. functional requirement: allow a member to reserve a video allow staff to 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. functional requirement: None. (This is a nonfunctional requirement—a domain model constraint. ) 310414 REQUIREMENTS CAPTURE 4
USE-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. 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). functional requirement: allow a customer to enter a review for a video – 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. functional requirement: allow staff to 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 310414 REQUIREMENTS CAPTURE 5
USE-CASE MODELING EXAMPLE — ANALYSIS – Using the Web, customers should be able to buy and rent videos and browse the reviews entered by other customers. functional requirement: allow a customer to buy a video allow a customer to rent a video allow a customer to browse video reviews – Managers must be able to generate various reports on sales/rentals of videos. functional requirement: allow a manager to generate reports – Staff must be able to sell/rent videos from the store’s inventory and return rented videos to the store's inventory. functional requirement: allow staff to buy (sell) a video allow staff to rent a video allow staff to 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. functional requirement: allow staff to lookup customer/member info 310414 REQUIREMENTS CAPTURE 6
USE-CASE MODELING EXAMPLE — ANALYSIS – 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). functional requirement: allow staff to enter video information 310414 REQUIREMENTS CAPTURE 7
USE-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 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. 310414 REQUIREMENTS CAPTURE 8
USE-CASE MODELING EXAMPLE — ANALYSIS allow a customer to buy a video allow staff to sell (buy) a video allow staff to lookup customer information Buy video allow a customer to rent a video allow staff to return a rented video allow staff to produce rented video overdue notices allow staff to lookup customer information Rent video allow a customer to enter a review for a video allow a customer to browse video reviews Manage reviews allow a member to reserve a video allow staff to reserve a video Reserve video allow staff to enter/update customer information allow a member to update their personal information Manage customer info allow staff to enter video information Manage video info allow a manager to generate reports Generate reports 310414 REQUIREMENTS CAPTURE 9
USE-CASE MODELING EXAMPLE — SOLUTION 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. Buy video Customer 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. Rent video Manage reviews Staff Reserve video 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. Manage customer info 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 video info Manage customer info allows a member (via the Web) or a staff (in the shop) to enter or update personal customer/member information. Member Generate reports Video Sales and Rentals System 310414 Manager 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. REQUIREMENTS CAPTURE 10