Share
Explore

Creating Object Interaction Diagrams for Business Domains

Creating Object Interaction Diagrams for Business Domains

image.png
Objective: In this lab, students will learn how to create Object Interaction Diagrams (OIDs) to represent the dynamic behavior and collaboration between objects within a business domain. By the end of this lab, students should be able to: 1. Understand the purpose and components of an Object Interaction Diagram 2. Identify objects and their interactions within a given business domain 3. Create an Object Interaction Diagram using paper and pencil
Introduction: Object Interaction Diagrams, also known as Sequence Diagrams, are a type of UML (Unified Modeling Language) diagram that showcases how objects interact with each other over time to accomplish a specific task or scenario. These diagrams are essential for understanding the dynamic behavior of a system and help in identifying the methods and messages exchanged between objects.
Components of an Object Interaction Diagram: 1. Objects: Represented by rectangles with the object name and optional class name. 2. Lifelines: Vertical dashed lines that represent the object's existence over time. 3. Activation Bars: Solid rectangles on the lifeline that indicate when an object is actively participating in an interaction. 4. Messages: Arrows between lifelines that represent method calls or messages sent between objects. Solid arrows denote synchronous messages, while dashed arrows denote asynchronous messages or returns. 5. Time: The diagram is read from top to bottom, showing the sequence of interactions over time.
Example Business Domain: Online Food Ordering System
Step 1: Identify the objects in the business domain - Customer - OrderingSystem - Restaurant - DeliveryPartner
Step 2: Draw the objects and their lifelines On a piece of paper, draw four rectangles representing the objects identified in Step 1. For each object, draw a vertical dashed line (lifeline) extending downwards from the rectangle.
Step 3: Identify the interactions between objects 1. Customer places an order using the OrderingSystem 2. OrderingSystem sends the order to the Restaurant 3. Restaurant prepares the order and updates the OrderingSystem 4. OrderingSystem assigns a DeliveryPartner to pick up the order 5. DeliveryPartner delivers the order to the Customer and updates the OrderingSystem 6. OrderingSystem notifies the Customer about the delivery status
Step 4: Add messages and activation bars For each interaction identified in Step 3, draw arrows between the lifelines to represent messages. Add activation bars on the lifelines to indicate when an object is actively participating in the interaction.
Step 5: Review and refine the diagram Review the Object Interaction Diagram to ensure all objects, lifelines, messages, and activation bars are properly represented. Make any necessary adjustments to improve clarity and readability.
Exercise: Choose a business domain from the list below and create an Object Interaction Diagram using paper and pencil. Identify at least four objects and six interactions between them. 1. Library Management System 2. Hotel Reservation System 3. ATM Banking System 4. E-commerce Shopping Platform
Conclusion: Object Interaction Diagrams are valuable tools for visualizing and understanding the dynamic behavior of objects within a business domain. By following the steps outlined in this lab and practicing with various examples, students can develop the skills needed to create effective OIDs and better communicate the interactions between objects in a system.
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.