information systems engineering interaction diagrams: sequence diagram collbortion diagram

20
Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Upload: benedict-rose

Post on 04-Jan-2016

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Information Systems Engineering

Interaction Diagrams:Sequence DiagramCollbortion Diagram

Page 2: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Interaction Diagrams

• Shows, step-by-step, flows through a use case:- What objects are needed for the flow- What messages the objects send to each other- What actor initiates the flow - What order the messages are sent

• Sequence and Collaboration diagrams: - Show the same information but is organized differently

- Show it in a way that is more useful to developers- Help to define how the system will do- Focus on objects (classes) that will be created to

implement the functionality spelled out in the use cases

Page 3: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Interaction Diagrams

• The steps involved in creating them:- Find the Objects

(Examine the nouns in the flow of events)

- Finding the Actors(External stimulus (who or what) that

starts flow of events)- Add Messages

(Communication)

Page 4: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Sequence Diagrams

• Sequence diagrams are interaction diagrams ordered by time

• Each diagram represent one of the flows through a use case

• Sequence Diagram users:• Users can look at these diagrams to see the specifics of

their business processing

• Analysts see the flow of processing in the Sequence diagrams

• Developers see objects that need to be developed and operations for those objects

• Quality assurance engineers can see the details of the process and develop test cases based on the processing

Page 5: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Sequence Diagrams

• Actors and Objects shown at the top of the diagram

• Each object has a lifeline, drawn as a vertical dashed line below the object

The lifeline begins when the object is instantiated and ends when the object is destroyed.

• A Message is drawn between the lifelines of two objects to show that the objects communicate (each message will become an operation). Messages can also be reflexive, showing that an object is calling one of its own operations

Page 6: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Sequence Diagrams: Objects Persistence

• Persistent: A persistent object is one that will be saved to a database or to some other form of persistent storage. The implication here is that the object will continue to exist, even after the program has terminated

• Static: A static object is one that stays in memory until the program is terminated. It lives beyond the execution of this Sequence diagram, but is not saved to persistent storage. There is, at most, one instance of a static object in memory at any given time

• Transient: A transient object is one that stays in memory only for a short time (until the logic in the Sequence diagram has finished, for example)

Page 7: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Sequence Diagrams: Messages Synchronization

• Simple: This is the default value for messages.

Page 8: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Sequence Diagrams: Messages Synchronization

• Synchronous: When the client sends the message and waits until the supplier has acted upon the message

Page 9: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Sequence Diagrams: Messages Synchronization

• Asynchronous: The client sends the message to the supplier. The client then continues processing, without waiting to see if the message was received or not

Page 10: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Sequence Diagrams: Messages Synchronization

• Balking: The client sends the message to the supplier. If the supplier is not immediately ready to accept the message, the client abandons the message

Page 11: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Sequence Diagrams: Messages Synchronization

• Timeout: The client sends the message to the supplier and waits a specified amount of time. If the supplier isn't ready to receive the message in that time, the client abandons the message

Page 12: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Sequence Diagrams: Messages Synchronization

• Procedure Call: The client sends the message to the supplier. The client then must wait until the entire nested sequence of messages is processed before continuing

Page 13: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Sequence Diagrams: Messages Synchronization

• Return: This option indicates the return from a procedure call

Page 14: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Collaboration Diagrams

• Show easily which objects communicate with which other objects

• If you need to change an object, you can easily see which other objects might be affected. difficult to see the sequencing information

Page 15: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

• A sequence diagram shows object interaction arranged in time sequence. It depicts the objects involved in the scenario and the sequence of messages exchanged between the objects needed to carry out the functionality of the scenario.

• While a collaboration diagram is an alternative way to show a scenario. Object interactions are organized around the objects and their links to each other.

• A collaboration diagram contains: objects drawn as rectangles, links between objects, messages shown as text and an arrow that points from the client to the supplier

The Difference between sequence diagram and collaboration diagram

Page 16: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Example: ATM Withdrawal1. Customer inserting his card into the card reader2. Then, the card reader reads the card number, 3. opens Joe's account object,4. and initializes the ATM screen. 5. The screen prompts Joe for his PIN. He enters 1234. 6. The screen verifies the PIN with the account object. 7. The screen presents Joe with his options, and he

chooses withdraw. 8. The screen then prompts Joe for the amount to

withdraw. 9. He chooses $20. 10. Then, the screen withdraws the funds from the

account. 11. The account object, verifies that the account contains

at least $20. 12. Then, it deducts the funds from the account.13. Next, it instructs the cash dispenser to provide $20 in

cash. 14. Joe's account also instructs the dispenser to provide a

receipt.15. Lastly, it instructs the card reader to eject the card.

Page 17: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Practice• Create the Sequence diagram and Collaboration diagram

to the use case that adds an item to the shopping cart

• The following scenario will proceeds:– The Customer actor issues Add white crew socks to

cart.– Cart Mgr then issues Get white crew socks to Product

Mgr– Product Mgr searches the Product Items by sending

Find product (white crew socks)– Product Items sends Get product to White Crew

Socks– Cart Mgr then issues the Add white crew socks to cart

to the Cart Items– The Cart Items then Add white crew socks to cart to

itself.

Page 18: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

Practice cont.

• Your objects besides the actor are

1. Customer2. Cart Interface3. Product Mgr 4. Product Items 5. White Crew Socks 6. Cart Items

Page 19: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram
Page 20: Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram