|
||
|
Lesson 1
UML Sequence diagram
|
||
| Encapsulation Revisited
The goal of problem analysis is to define the purpose and interface of every problem domain resource.
Interaction diagrams
So far, you have determined the purpose by defining each class and the relationships between the classes in the class diagram. Now you need to add the interfaces. The primary tool for discovering and understanding interfaces is interaction diagrams.
The sequence and collaboration diagrams are used to model the interactions between objects. The sequence diagram illustrates the interaction
between objects over time. The collaboration diagram illustrates the object interactions across the links between the objects.
Sequence Diagram
In this module, the sequence diagram will be used as the primary tool. Object purpose and interfaces
Interactions help to define an object's purpose, that is, the ways that an object participates in tasks, how it talks and works with other
objects, why the object is needed.
Operations and attributes
Interfaces are questions and requests that an object is able to respond to. If the problem statement says that an object must be able to answer a question or respond to a request, then the object must have a corresponding interface. Hence, interactions help to define
An interface appears as an operation in a class definition. Operations describe what the object can do and what can be done to the object.
Operations can receive, manipulate, and return information. This information appears in the class definition as attributes.
In this module, you will learn:
|
||
|
|
||