Presentation is loading. Please wait.

Presentation is loading. Please wait.

310313 REQUIREMENTS CAPTURE 1 DOMAIN MODELING EXAMPLE A video sales and rental shop would like to computerize its management of sales and rental of its.

Similar presentations


Presentation on theme: "310313 REQUIREMENTS CAPTURE 1 DOMAIN MODELING EXAMPLE A video sales and rental shop would like to computerize its management of sales and rental of its."— Presentation transcript:

1 310313 REQUIREMENTS CAPTURE 1 DOMAIN 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)

2 310313 REQUIREMENTS CAPTURE 2 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).

3 310313 REQUIREMENTS CAPTURE 3 DOMAIN 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. classes & associations: customer Buys movie video; customer Rents movie 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. classes & associations: customer Rents movie video; –> movie video Has rental copy; customer Rents rental copy; attributes:Buys –> quantity; Rentalcopy -> copyNumber, dateDue –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

4 310313 REQUIREMENTS CAPTURE 4 DOMAIN MODELING EXAMPLE — ANALYSIS –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 Member Speciallizes Customer –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 Rentalcopy –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) = 5 max-card(rental copy, Rents) = *

5 310313 REQUIREMENTS CAPTURE 5 DOMAIN 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. classes & associations: Customer Provides review IsFor MovieVideo –> Customer Provides Review; MovieVideo Has Review attributes: Review –> review text, rating –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). attributes: Review –> anonymous –The video shop maintains the following information about all customers (members or nonmembers): name, address, phone number, fax number, age, sex, and email address attributes:Customer–> name, address, phoneNumber, faxNumber, age, sex, email;

6 310313 REQUIREMENTS CAPTURE 6 DOMAIN 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 member's only area of the video shop's web site, including accessing and changing their personal information. attributes:Member–>memberNumber, 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

7 310313 REQUIREMENTS CAPTURE 7 DOMAIN 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: MovieVideo –> title, leadingActor[0..*], director, producer, genre, synopsis, releaseYear, runningTime, sellingPrice, rentalPrice

8 310313 REQUIREMENTS CAPTURE 8 DOMAIN MODELING EXAMPLE — ANALYSIS

9 310313 REQUIREMENTS CAPTURE 9 DOMAIN MODELING EXAMPLE — SOLUTION 1 Has 0..* RentsHasReview 1* Provides Reserves 1 * * * 1 * 1 0..5 0..1 Buys 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

10 310313 REQUIREMENTS CAPTURE 10 DOMAIN MODELING EXAMPLE — SOLUTION 1 Has 1* 0..* Member memberNumber password RentalCopy copyNumber dateDue Review reviewText rating anonymous MovieVideo title leadingActor [0..*] director producer genre synopsis releaseYear runningTime sellingPrice rentalPrice Customer name address phoneNumber faxNumber age sex email Rents HasReview Provides Reserves 1 * * * 1 * 1 0..5 0..1 Buys quantity

11 310313 REQUIREMENTS CAPTURE 11 DOMAIN MODELING EXAMPLE — SOLUTION 2 Has 0..* RentalHistoryHasReview 1* Provides Reserves 1 * * * 1 * * 0..5 0..1 Buys quantity ReviewCustomer Member RentalCopyMovieVideo CurrentRental * 1 CurrentRental keeps track of currently rented videos and RentalHistory keeps track all past rentals

12 310313 REQUIREMENTS CAPTURE 12 DOMAIN MODELING EXAMPLE — SOLUTION 2 Has 1* 0..* Member memberNumber password RentalCopy copyNumber dateDue Review reviewText rating anonymous MovieVideo title leadingActor [0..*] director producer genre synopsis releaseYear runningTime sellingPrice rentalPrice Customer name address phoneNumber faxNumber age sex email RentalHistory HasReview Provides Reserves 1 * * * 1 * * 0..5 0..1 Buys quantity CurrentRental * 1

13 310313 REQUIREMENTS CAPTURE 13 DOMAIN MODELING EXAMPLE —COMMON ERROR Representing the client/organization –(i.e., VideoShop, Shop) Representing information not specified in the problem statement –(e.g., VideoCatalogue, BankAccount) Incorrect use/overuse of generalization –(e.g., Person, Nonmember) Incorrect use/overuse of aggregation/composition –(e.g., MovieVideo<>——RentalCopy, MovieVideo<>——Review, Customer<>——Member) Representing operations –(e.g., generates, browses, enters, looks up, etc.)

14 310313 REQUIREMENTS CAPTURE 14 DOMAIN MODELING EXAMPLE —COMMON ERROR Representing implementation aspects –(e.g., System, Web, telephone, reports) Over specifying the model –(e.g., employee, staff, manager, inventory) Key question: What information about procedures/ things needs to be persistent (i.e., in files or a database)?


Download ppt "310313 REQUIREMENTS CAPTURE 1 DOMAIN MODELING EXAMPLE A video sales and rental shop would like to computerize its management of sales and rental of its."

Similar presentations


Ads by Google