Professional Documents
Culture Documents
Object Oriented Analysis & Design Lab # 5
Object Oriented Analysis & Design Lab # 5
Object Oriented Analysis & Design Lab # 5
Lab # 5
• A system sequence diagram is used primarily to show the interactions between actor and system (as a
blackbox)
• Object is represented as a rectangle which contains the name of the object underlined.
:Object1
: System
• Lifeline: The Lifeline identifies the existence of the object over time. The notation for a
Lifeline is a vertical dotted line extending from an object.
• if -> (opt)[condition]
• Activation: thick box over object's life line; drawn when object's method is on the stack
messageName(argument)
Lifeline
Sample:
makeNewSale
Simple cash-only Process Sale scenario:
loop [ more items ]
1. Customer arrives at a POS checkout enterItem(itemID, quantity)
with goods and/or services to purchase.
2. Cashier starts a new sale.
3. Cashier enters item identifier. description, total
4. System records sale line item and
presents item description, price, and
running total.
Cashier repeats steps 3-4 until indicates
done. endSale
5. System presents total with taxes
calculated.
6. Cashier tells Customer the total, and total with taxes
asks for payment.
7. Customer pays and System handles
payment. makePayment(amount)
...
Task 2: Create a system sequence diagram for the following flow of withdraw money from a local
bank ATM.
1. Customer arrives at the ATM machine and inserts a bank card.
2. The system requests for user authentication (request PIN number).
3. Customer inserts PIN number. System prompts user to select services.
4. Customer request withdrawal of money.
5. System prompts the amount of withdrawal.
6. Customer enters withdrawal amount.
7. System displays success of request message, ejects card and dispense money.
8. User collects card and money
Task 3: Create a system sequence diagram for the following main success scenario of a “book
check out” use case of a library.
1. The Worker tells the System the identity of a patron who wishes to check out books.
2. The System confirms that the patron is allowed to check out books, and remembers the
patron's identity.
3. The Worker tells the system the identity of a book this patron is checking out.
4. The System confirms that the book can circulate, calculates the due date based on whether the
patron is a faculty member or a student, and records that the patron has checked out this book,
which is due on the calculated due date, and makes that information available from the library
catalog.
5. The System tells the Worker the due date (which also confirms that the book has been checked
out).
6. The Worker repeats steps 3-5 until indicates done
Task 4: Create a system sequence diagram for the following scenario of a “add to cart” use case of
an online shopping system.
1. The user opens the website and selects the item category (e.g. dresses, accessories)
2. The user choose the item to purchase
3. The system check the availability of item; if item is available the system ask the quantity
4. The user enter the quantity and the click add to cart button
5. The system ask if user want to continue shopping
6. If user wants to do more shopping the system opens the item page