UML Diagrams: Sequence and Class Diagrams
Sequence Diagram
This tool is part of the UML diagrams and allows dynamic plot the sequence of steps or activities that are run on a particular use case. Elements are:
- Objects: Represented by a rectangle with the name at the bottom, a broken line which we call lifeline. On this is placed a vertical rectangle which call activities which indicates when an object is in operation.
- Messages: Represent information sent from the lifeline of an object to the lifeline of another. They can be of three different types:
- Simple: Indicates the transfer of control from one object to another.
- Synchronous: Indicates that responses should be expected to continue with the process.
- Asynchronous: An automatic message, also called, is not expected to answer or make transfer of control.
- Time: Represented by the dotted line beneath the objects, i.e., the longer the line, the longer the object within the process.
Class Diagram
Concept: This is one of the most important diagrams in object-oriented design. It describes all classes of a system and their corresponding relations, but never describes the dynamic, graphical representation of a class. A class is a rectangle which has a name at the top, some attributes or characteristics on the front and a method or procedure used at the bottom.
Relationships are the ways of how to associate different classes. It takes generalization relationship, which can manage complexity through a legal system in the form of the kind which allows the bundling of characteristics of a class in a more general class. The most common names are super-class, sub-class.
It is also called hierarchical relationship between classes. There are two types of inheritance: inheritance and herenciaria simple.
Multiplicity ratio: This ratio indicates how much of a class of objects relates to a class object. The line used for this relationship is a continuous line and the ends placed the number of objects that are related. It is the equivalent to the cardinality in the case of use.