Wednesday, September 23, 2009

Steps To Develop a Sequence Diagram

STEPS TO DEVELOP A SEQUENCE DIAGRAM


1.Identify all objects and actors that are involved in a scenario. Use only actors identified in the use case diagram. Use only objects identified in the class diagram.
2.Based on the flow of activities, identify each message that will be required to carry out a scenario and identify the source of the message
      a.Identify the object that needs the service
      b.Identify the object that has access to the required input parameter.
      c.Usually a one to many association in the class diagram, the object on the one side will create and send messages to the object on the many side.
3.Determine whether each message is always sent or is sent only on certain conditions.
4.Sequence the message correctly and attach them to the lifelines.
5.Add the formed syntax on message to describe conditions, message names, and passed parameters.
6.If desired, add the response messages and communications to make the sequence diagram complete.


ACTIVITY



Identify the 2 possible scenarios and develop a flow of events for each.

Quality Building Supply has two kinds of customers – contractors and the general public. When a contractor checks out materials, he or she takes them out to the contractor check out desk. The clerk scans in the items to be purchased. The system creates electronic ticket for the items. The system compares the total amount against the contractor's current credit limit, and if it is acceptable finalizes the sale. Once a month the system sends and invoice to the contractor and when payment comes in increases the credit limit back to the original value. The electronic ticket is maintained in the system and can be printed out at any time for the ff. 60 days. Some contractors ask for a printout, some will not. A sale to the general public is simply entered into a cash register. Payment can be a cash, check or credit card.

The clerk must enter the type of payment to ensure that the cash register balances at the end of the shift. For credit card payments, the system prints out a credit card voucher that the customer must sign.