310414 requirements capture 1 domain modeling example a video sales and rental shop would like to...
TRANSCRIPT
310414310414 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE1
DOMAIN MODELING EXAMPLEDOMAIN 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)
310414310414 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE2
DOMAIN MODELING EXAMPLE (cont’d)DOMAIN 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).
310414310414 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE3
DOMAIN MODELING EXAMPLE — ANALYSISDOMAIN MODELING EXAMPLE — ANALYSIS
We first analyze the stated domain model requirements and then present the domain model.
– 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.
classes & associations: customer buys movie video;customer rents copy of movie video –> movie video has rental copy; customer rents rental copy;
attributes: buys –> quantity;rental copy -> copy number, date due
– The system must keep track of overdue rental videos and allow notices to be sent to customers who have videos overdue.
functional requirement: no new domain model requirements in this statement
– 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.
generalization: member is a kind of customer
310414310414 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE4
DOMAIN MODELING EXAMPLE — ANALYSISDOMAIN MODELING EXAMPLE — ANALYSIS
– Members should be able to make reservations for movie video rentals either in person at the store, by telephone or via the Web.
classes & associations: member reserves rental copy
– 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.
constraint: max-card(rental copy, reserves) = 5max-card(rental copy, rents) = *
– 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).
classes & associations: customer provides review for movie video –> customer provides review;movie video has review
attributes: review –> review text, rating, anonymous
310414310414 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE5
DOMAIN MODELING EXAMPLE — ANALYSISDOMAIN MODELING EXAMPLE — ANALYSIS
– 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 member's only area of the video shop's web site, including accessing and changing their personal information.
attributes: customer –> name, address, phone number, fax number, age, sex, email;
member –> member number, password
– Using the Web, customers should be able to buy and rent videos and browse the reviews entered by other customers.
functional requirement: no new domain model requirements in this statement
– Managers must be able to generate various reports on sales/rentals of videos.functional requirement: no new domain model requirements in this statement
– Staff must be able to sell/rent videos from the store’s inventory and return rented videos to the store's inventory.
functional requirement: no new domain model requirements in this statement
310414310414 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE6
DOMAIN MODELING EXAMPLE — ANALYSISDOMAIN MODELING EXAMPLE — ANALYSIS
– When selling or renting videos, staff must be able to look up customer information and determine whether the customer is a member.
functional requirement: no new domain model requirements in this statement
– 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).
attributes: movie video –> title, leading actor[0..*], director, producer, genre, synopsis, release year, running time, selling price, rental price
310414310414 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE7
DOMAIN MODELING EXAMPLE — SOLUTION 1DOMAIN MODELING EXAMPLE — SOLUTION 1
Has 0..*
RentsHasReview
1* Provides
Reserves
1
*
*
* 1
*
1
0..5
0..1Buys
quantity Buys can also be a class related by two one to many associations with Customer and MovieVideo
Customer
Member
RentalCopyMovieVideo
Note that this association can only keep track of current rentals, but not of rental history since a rental copy can only be related to one customer
Review can also be an association class of a many to many association between MovieVideo and Customer
Review
310414310414 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE8
DOMAIN MODELING EXAMPLE — SOLUTION 1DOMAIN MODELING EXAMPLE — SOLUTION 1
Has
1*
0..*
Member
memberNumberpassword
RentalCopy
copyNumberdateDue
Review
reviewTextratinganonymous
MovieVideo
titleleadingActor [0..*]directorproducergenresynopsisreleaseYearrunningTimesellingPricerentalPrice
Customer
nameaddressphoneNumberfaxNumberagesexemail
Rents
HasReview
ProvidesReserves
1
*
*
*
1
*
1
0..5
0..1
Buys
quantity
310414310414 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE9
DOMAIN MODELING EXAMPLE — SOLUTION 2DOMAIN MODELING EXAMPLE — SOLUTION 2
Has 0..*
RentalHistoryHasReview
1* Provides
Reserves
1
*
*
* 1
*
*
0..5
0..1Buys
quantity
Review Customer
Member
RentalCopyMovieVideo
CurrentRental
*
1
CurrentRental keeps track of currently rented videos and RentalHistory keeps track all past rentals
310414310414 REQUIREMENTS CAPTUREREQUIREMENTS CAPTURE10
DOMAIN MODELING EXAMPLE — SOLUTION 2DOMAIN MODELING EXAMPLE — SOLUTION 2
Has
1*
0..*
Member
memberNumberpassword
RentalCopy
copyNumberdateDue
Review
reviewTextratinganonymous
MovieVideo
titleleadingActor [0..*]directorproducergenresynopsisreleaseYearrunningTimesellingPricerentalPrice
Customer
nameaddressphoneNumberfaxNumberagesexemail
RentalHistory
HasReview
ProvidesReserves
1
*
*
*
1
*
*
0..5
0..1
Buys
quantity
CurrentRental
*
1