ICS 121: UML Continued
Overview
- Video store example
- Video store use cases
- Video store activity diagram
- Video store conceptual classes
- Video store notes on draft 1
- Account states
- Video states
- Video rental deployment diagram
- Video rental scenario diagram
Video store example
- Imagine we are modeling the software system that runs
a video rental store.
- We might make a model to help ourselves understand the system as
it exists now, so that we can precisely describe a proposed change
to that system.
- Example details
- Customers become members of video rental store
- They use a credit card as collateral, but can pay with cash
- Pricing depends on the type of video and days rented
- Store manager wants to encourage more rentals by making recommendations
- Store owner wants to increase efficency of checkouts on busy nights
- draft use case diagram
UC-01: Joining the video store
- Clerk at terminal initiates Join dialog
- Customer swipes credit card
- Terminal says that card number and expiration are valid
- Clerk enters names of family members
- Terminal prints cards
- Note: Could this be self-serve?
- Extension: invalid cards are rejected
- Extension: when terminal is out of cards, no one can join
UC-02: Renting a video, paying later
- Clerk scans card
- Clerk scans desired video(s)
- Terminal displays details of each video scanned
- Clerk indicates he/she is finished
- Terminal shows rental options
- Customer indicates choice of rental options
- Clerk selects rental options
- Terminal displays price and due date
- Clerk asks "pay now or later?"
- Customer selects later payment
- Clerk enters payment choice
- Terminal prints receipt for signature
- Note: invalid or expired cards are rejected
- Note: Could this be self-serve?
- Note: showing titles helps catch mixed-up videos
- Note: Customer needs to know price before they can decide
to pay now or later
UC-03: Returning a video in person
- Clerk scans videos
- Terminal displays customer name and any fees due
- Clerk asks customer to pay fees
- Terminal tells clerk where to sort each video
- Clerk asks customer to rate video(s)
- Clerk enters ratings
- Terminal suggests other videos that customer might like
- Note: invalid video ids are rejected
- Note: Could this be self-serve?
- Note: Suggesting a video helps some people decide faster
UC-04: Optimizing pricing
- Manager requests rental report
- System displays most frequently rented videos
- Manager requests list of pricing packages
- System displays pricing packages
- Manger edits pricing package: price, rental days
Video Store Activity Diagram
- Shows a flow-chart that can explain several use cases and
extensions
- E.g., a loop for checking out videos
- E.g., a branch for paying now or later
- E.g., what if the customer card expired or they are over their
limit?
- activity diagram
Video Store Conceptual Classes
- First draft, just look for nouns and add your experience:
- Customer: name
- Clerk
- Terminal
- Manager
- Credit card: number, expiration
- Account
- Membership card: barcode
- Video: barcode, title
- Pricing package: price, rental days
- Payment option: now or later
- Rating
- Recomendation
- initial class diagram
Notes on draft 1
- Do we really need all these classes?
- What are the multiplicities and aggregations?
- What are the attributes and operations?
- Can we cover all the use cases?
Account states
- New
- Active:
- Expired
- Canceled
Video states
- Lifecycle:
- untested
- new release
- regular stock
- old
- previously viewed
- damaged
- lost
- One rental:
- on-shelf
- rented
- to-be-shelved
- state diagram
Video rental deployment diagram
- Terminal
- Application and Database Server
- Inventory DB
- Customer DB
- Point-of-sales application
- Credit card payment
- Manager's workstation
- Cardholder's bank
Video rental scenario
- Clerk scans card
- Terminal asks server to verify card number
- Server looks up customer record
- Clerk scans desired video
- Terminal asks server to verify video number
- Server looks up video record
- Terminal displays details of each movie
- Clerk indicates he/she is finished
- Terminal asks server for appropriate rental options
- Server looks up rental options for those videos
- Terminal shows rental options
- Customer indicates choice of rental options
- Clerk selects rental options
- Terminal asks server to compute total and due date
- Terminal displays price and due date
- Clerk asks "pay now or later?"
- Customer selects later payment
- Clerk enters payment choice
- Terminal tells server that the transaction is complete
- Server asks cardholder bank for authorization
- Server updates inventory and customer status
- Terminal prints receipt for signature
sample use case templateexample test plan templateProject plan template