OOAD-Lab 5 Solution
OOAD-Lab 5 Solution
OOAD-Lab 5 Solution
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)
...