Presentation is loading. Please wait.

Presentation is loading. Please wait.

Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram.

Similar presentations


Presentation on theme: "Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram."— Presentation transcript:

1 Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram

2 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

3 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)

4 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

5 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

6 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)

7 Sequence Diagrams: Messages Synchronization Simple: This is the default value for messages.

8 Sequence Diagrams: Messages Synchronization Synchronous: When the client sends the message and waits until the supplier has acted upon the message

9 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

10 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

11 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

12 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

13 Sequence Diagrams: Messages Synchronization Return: This option indicates the return from a procedure call

14 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

15 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

16 Example: ATM Withdrawal 1.Customer inserting his card into the card reader 2.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.

17 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.

18 Practice cont. Your objects besides the actor are 1. Customer 2. Cart Interface 3. Product Mgr 4. Product Items 5. White Crew Socks 6. Cart Items

19

20


Download ppt "Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram."

Similar presentations


Ads by Google