Sequence Diagram Example: Reserve Video (Staff Scenario)
Sequence Diagram Example: Reserve Video (Staff Scenario)
Sequence Diagram Example: Reserve Video (Staff Scenario)
The domain model, showing the navigability of the associations, and the Reserve video (staff scenario) use-case description for the video sales and rental shop application are given below. Using only one boundary class, one control class and any of the domain model entity classes, construct a sequence diagram that shows the roles required to realize this use case and the messages that are passed among the roles.
*
MovieVideo
1
Has
0..*
RentalCopy
* *
0..5
IsFor
CurrentRental
RentalHistory Reserves
Review
Provides
1 *
Customer
Buys
quantity
Member
0..1
Finally, the ReserveVideoMgr needs to inform both the RentalCopy (Message 9) and the Member (Message 10) about the reservation (i.e., give them a reference to each other) since the association is bidirectional in the domain model.
Although not specified in the use case, it is reasonable to assume that the ReserveVideoUI informs the staff about the status of the reservation request (Message 11). The use case ends (Line 5 of Reserve Video use case)
4
1. Since we are only given the movieID as an input value, we need to identify the rental copies for a movie via its associated MovieVideo role, which knows about all of its rental copies by way of the association Has between MovieVideo and RentalCopy. 2. Since not all copies of a video may be available for rental (either rented already or reserved), we need to search for an available copy. Since this is the basic path, we assume that the search succeeds in finding an available copy. 3. There is no need to check how many videos a member has reserved as the precondition states that he has less than 5 reserved. 4. Since the navigability of the Reserves association is bidirectional, it is necessary for the Member role to be informed of the fact that a new video has been reserved and which copy has been reserved.
7
do not represent physical actions. do not describe UI elements (e.g., textbox). do not originate from entity roles. are sent to only one instance of a role. are named from the perspective of what the sending role wants the receiving role to do for it.
8