Activity Diagram and Sequence Diagram - Practice Example
Activity Diagram and Sequence Diagram - Practice Example
Example-1:
Consider an online reservation for a Bangladesh Railway Ticketing System. The train ticket can
be booked by customers on the web site of Bangladesh Railway. The customer has the option to
directly pay for the ticket through the website. In that case, the ticket cannot be cancelled (neither
by the customer nor by the railway system). If the customer has not paid for the ticket, the railway
system can cancel the seat if the customer does not show up one hour before the trip. When the
reservation is cancelled, the seat will become free and can be sold to another customer. Both the
customer and the railway system authority must authenticate themselves for performing operations
with the system.
Draw the activity diagram for ticket booking and Draw the sequence diagram for the given
system.
Example-2:
Create a set of use cases for the process of buying glasses from the viewpoint of the patient, but
do not bother to identify the steps within each use case. (Just complete the information at the top
of the use case form.) The first step is to see an eye doctor who will give you a prescription. Once
you have a prescription, you go to a glasses store, where you select your frames and place the order
for your glasses. Once the glasses have been made, you return to the store for a fitting and pay for
the glasses.
Provide Activity diagram and Sequence diagram for prescription process of a doctor.
Example-3:
“Amar Bazar” is an E-commerce website is a virtual market place for all buyers and sellers. In
this web portal any user can register themselves either as buyer or seller. While registering as buyer
or seller, the user just fill the registration form and upon activating from the email the user receives
a valid login ID and password to do the online business on this virtual market place.
Seller sale product but need to login. While selling the product, the seller may add product or delete
product. The add product must take picture of the product for the upload. In the selling of the
product, the seller provide product name, feature of the product, select product type, product
quantity and product status. Finally the seller clicks the button Sale.
On the other hand, Buyers buy product and also need to login. While buying product, the buyer
may pay by cash or pay by credit card. In case of pay by credit card, this must check the validity
of the card to the bank. In the buying of the product, the buyer select the category of the product
and select the product which then display the feature, quantity and status of the product selected
by the buyer. The buyers then enter the quantity of the product and finally click the button buy.
Provide Activity diagram and Sequence diagram for add a product and buying a product with
payment.
Example-5:
Jalalabadh International Airport is using an online Airline Ticketing System (ATS) system. This
software system allows passengers to check-in and fly to their destinations. To board a plane, a
passenger must have a boarding pass. A passenger may obtain his/her boarding pass using the ATS
as an automatic self-check-in terminal or instead go to a counter where an agent can provide the
services provided by ATS.
For Issuing a boarding pass, the passengers identify must be verified. Now, suppose there is a
software system that can verify the passenger’s information (using identification card) against the
existing database. Call this system Passenger Verification System (PVS). Its functionality is to
guarantee that passenger’s information (i.e., a Person’s name, National ID number, Address and
Age) matches what is contained in a database.
A passenger may check-in his/her luggage and change seat assignment prior to his/her boarding
pass being issues. Assume every passenger uses an official identification card (e.g. Driving
License or Passport) for identity validation.
Provide activity diagram and sequence diagram for “Boarding Pass” and “Passenger Verification”.