Podcast
Questions and Answers
What does UML stand for in software engineering?
What does UML stand for in software engineering?
Unified Modeling Language
Which of these is a type of UML diagram used to describe the functional behavior of a system?
Which of these is a type of UML diagram used to describe the functional behavior of a system?
Which of these is a type of UML Diagram that describes the static structure of a system?
Which of these is a type of UML Diagram that describes the static structure of a system?
Which of these is a type of UML dynamic diagram?
Which of these is a type of UML dynamic diagram?
Signup and view all the answers
UML static modeling only focuses on the interaction between objects, not the overall structure of the system.
UML static modeling only focuses on the interaction between objects, not the overall structure of the system.
Signup and view all the answers
Communication (Collaboration) diagrams and sequence diagrams are semantically equivalent.
Communication (Collaboration) diagrams and sequence diagrams are semantically equivalent.
Signup and view all the answers
Which UML diagram explicitly shows the time relationship between object interactions?
Which UML diagram explicitly shows the time relationship between object interactions?
Signup and view all the answers
Which of these is a strength of collaboration diagrams?
Which of these is a strength of collaboration diagrams?
Signup and view all the answers
What does an object lifeline represent in a sequence diagram?
What does an object lifeline represent in a sequence diagram?
Signup and view all the answers
A stereotyped message <> is used to indicate explicit deletion of an object.
A stereotyped message <
Signup and view all the answers
What is the purpose of activation boxes in a sequence diagram?
What is the purpose of activation boxes in a sequence diagram?
Signup and view all the answers
Which of these elements is NOT specifically used to represent conditions or iterations in a sequence diagram?
Which of these elements is NOT specifically used to represent conditions or iterations in a sequence diagram?
Signup and view all the answers
Sending a message to 'self' or 'this' within an object is a common practice in object-oriented programming to invoke a method within the same object.
Sending a message to 'self' or 'this' within an object is a common practice in object-oriented programming to invoke a method within the same object.
Signup and view all the answers
What is the purpose of a system sequence diagram (SSD)?
What is the purpose of a system sequence diagram (SSD)?
Signup and view all the answers
Which of the following is NOT typically included in a system sequence diagram?
Which of the following is NOT typically included in a system sequence diagram?
Signup and view all the answers
What is the primary purpose of constructing system sequence diagrams?
What is the primary purpose of constructing system sequence diagrams?
Signup and view all the answers
When designing software to handle use cases, what is 'One Central Class' strategy?
When designing software to handle use cases, what is 'One Central Class' strategy?
Signup and view all the answers
What is the main disadvantage of the 'One Central Class' strategy?
What is the main disadvantage of the 'One Central Class' strategy?
Signup and view all the answers
Which strategy for implementing use cases sends messages directly to actor classes?
Which strategy for implementing use cases sends messages directly to actor classes?
Signup and view all the answers
What is the main disadvantage of the 'Actor Class' strategy?
What is the main disadvantage of the 'Actor Class' strategy?
Signup and view all the answers
Which strategy for implementing use cases focuses on a dedicated class for each use case?
Which strategy for implementing use cases focuses on a dedicated class for each use case?
Signup and view all the answers
What is the main disadvantage of the 'Use-Case Class' strategy?
What is the main disadvantage of the 'Use-Case Class' strategy?
Signup and view all the answers
When designing an interaction diagram, how does a 'fork' pattern manage interactions?
When designing an interaction diagram, how does a 'fork' pattern manage interactions?
Signup and view all the answers
When designing an interaction diagram, how does a 'cascade' pattern manage interactions?
When designing an interaction diagram, how does a 'cascade' pattern manage interactions?
Signup and view all the answers
Study Notes
Lecture 6 (CS251) Software Engineering 1
- Lecture covers Object-Oriented (OO) Modelling, Interaction Diagrams (Sequence, Collaboration, & System Sequence Diagrams)
- Objectives of the lecture include learning the notation of interaction diagrams and how to visualize system-user interactions using different types of diagrams.
- It also includes learning how to decide on issues like fork & cascade, and how to implement use cases.
UML Diagrams
- Functional Diagrams (Use case diagrams): Describe the system's functional behavior from the user's perspective.
- Static Diagrams (Class, Object, & Package diagrams): Illustrate the system's static structure, including objects, attributes, and associations.
- Dynamic Diagrams: Include Interaction diagrams (Sequence & Collaboration diagrams) that describe the interaction between objects of the system. State diagrams that describe the dynamic behavior of an individual object. Activity diagrams that describe the dynamic system behavior, particularly the workflow.
UML Dynamic Modelling - Why?
- UML static modeling involves use cases, activity diagrams, and class/object modelling.
- Use cases describe the required behavior (operations) of a system, but don't specify which classes are responsible for computations.
- Initial class models identify classes and their relationships, but lack attribute and operation detail.
- Dynamic modelling links use cases and class modelling, showing how objects interact using messages.
- Dynamic modelling implements the required functionality to realize a use case in the software system.
UML Dynamic Modelling: Interaction Diagrams
- Interaction diagrams represent dynamic modelling, used for making and recording decisions related to class behavior (operations).
- Two types of interaction diagrams are Sequence Diagrams and Communication (Collaboration) Diagrams.
- Both types are equivalent but have different visual properties.
UML Interaction Diagrams: Sequence Versus Collaboration Diagrams
-
Sequence Diagrams: Show object interaction in time sequence with objects horizontally and time vertically.
- Strengths: Relationship in time is extremely clear.
- Weaknesses: Overall pattern of message flow is not easily seen.
-
Collaboration (Communication) Diagrams: Show how cooperating objects dynamically interact by sending and receiving messages.
- Strengths: Object interactions are clear.
- Weaknesses: Actual message sequence is not always obvious.
Sequence Diagrams
- Show participants (objects) in an interaction (use case or part of) and the sequence of messages among them.
- Each use case requires one or more sequence diagrams to describe its behavior.
- Building a sequence diagram begins by considering use case interactions and the originating message.
- Messages flow must be considered to understand which class should have the method in its protocol.
- Use case post-conditions and alternative scenarios should also be considered.
- Object diagrams can help visualise the before and after states of operations.
Object Lifelines
- Object lifelines show the duration of object existence in a diagram.
Objects Creation and Destruction
- Newly created objects are placed at their creation height.
- The <
> stereotyped message, along with a large X and short lifeline, indicates explicit object destruction.
Messages, Returns & Activation Boxes
- Message passing between objects is displayed using arrows and boxes representing object interactions.
Conditional Messages
- Conditional messages use a condition in brackets to influence message processing.
Conditions and Iterations
- Diagrams can represent conditional and iterative actions (using 'alt', 'else', 'loop' blocks).
Messages to "Self" or "This"
- Messages can be sent from an object to itself using 'self' or 'this' notation.
Sequence Diagram: Examples
- Practical examples illustrating sequence diagrams to visualize system behavior.
Sequence Diagram: Example 2
- More examples, showing the relationships between different system components involved in an activity.
Collaboration Diagrams
- Collaboration diagrams are similar to sequence diagrams but prioritize displaying the messages exchanged between objects rather than time sequence.
Collaboration Diagrams - Conversion From a Sequence Diagram
- Methods for converting sequence diagrams to collaboration diagrams are displayed.
- The sequence of diagrams can be mapped to a collaboration diagram.
Collaboration Diagrams - Objects Creation and Destruction
- Object creation and destruction are shown based on {new} and {destroyed} constraints in the diagram.
Collaboration Diagrams - An Example: Use Case & Class Diagrams
- Examples of how use-case and class diagrams are connected to illustrate business roles and functions.
- A class model diagram is given for lending books.
Collaboration Diagrams - An Example: From Static to Dynamic Modelling
- Example of a collaboration diagram converting from a static model to describe the interaction of borrowing a book.
Collaboration Diagrams - An Example: The Sequence Diagram
- This diagram shows the detailed sequence diagram for a book borrowing scenario.
Collaboration Diagrams - An Example: The Collaboration Diagram
- A detailed collaboration diagram for a book borrowing scenario is illustrated.
UML Interaction Diagrams: Sequence Versus Collaboration Diagrams
- Comparison between Sequence and Collaboration diagrams – explaining their differences (one-place for relationships; time ordering clarity).
Communication Diagram - Notation Summary
- Notation of communication diagrams: Rectangles represent objects, lines depict relationships (associations, dependencies, etc.).
Communication Diagram - Further Examples
- More detailed examples of communication diagrams. Several instances are given demonstrating messages exchanged between objects involved in an application.
System Sequence Diagrams (SSD)
- SSD is a visual summary that shows the events generated by external actors, inter-system events, and the order in which these occur.
- Emphasis is placed on events that cross system boundaries.
- SSD should represent the main success scenario and frequent alternative scenarios.
- SSD includes external actors, messages/methods, return values, and loop/iteration information.
Use Case Diagram of a Vending Machine
- Diagram illustrates a vending machine system with use cases for buying beverages, scheduled maintenance, repairs and loading items, and also illustrating the corresponding actors involved.
Vending Machine Use Cases Summaries
- These summarise the use case categories for the vending machine system, including their respective actors and functionalities.
From Use Case to System Sequence Diagram
- Instruction on deriving system sequence diagrams from use cases, viewing the system as a black box to model its interactions with actors.
- Key tips are provided for use case implementation - including drawing appropriate diagrams.
System Sequence Diagram for "Buy a Beverage" Use Case
- System events for the "Buy a Beverage use case" including inserting coins, choosing an item and receiving the items, and receiving change are displayed.
Design Issues: Strategies for Implementing Use-Cases
- Different method strategies for message handling, including one central class, actor classes, and use case classes.
- Advantages and disadvantages of each strategy.
Design Issues: Forks & Cascades
- Scenarios where objects need to interact without direct associations (like Company-Job-Person example).
- Fork: Centralized control in the sender. Cascade: Sending to another object for handling.
- Two design examples: one utilizing the fork pattern and another using the cascade pattern.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz covers key concepts from Lecture 6 of CS251 on Software Engineering, focusing on Object-Oriented Modelling and various UML diagrams. Test your knowledge on Interaction Diagrams, Use Case Diagrams, and how to visualize system-user interactions effectively.