Posts Tagged ‘UML’

Unified Modeling Language

Posted: August 16, 2013 in Other
Tags:

A class is a description of a quantity of objects that are typified by the same characteristics and the same behaviors.

An object has and Identity, a status, and a behavior. Identity is an attribute that distinguish each object from all other objects of its class. Object is a concrete- uniquely identifiable instance of a class.

 UML Diagram Types:-

  • Class Diagram:- Show the classes and the relationships between them. Ie a static view of a model.

  • Behavior Diagram:- Shows the sequence in which the objects relate to each other.

  • Component Diagram:- Shows the organization and dependencies of components.

Static relationships:-

Association:- An association describes a semantic relationship between classes. The specific relationship between objects in these classes is known as an object link. Object liks are the instances of associations.

Recursive association:- An association can be recursive. Recursive associations are used to link two different objects in one class.

Roles of association:-

  • Cardinality:- Cardinality shows how many instances can participate in the relationship. It is depended on the concreate siuation that is being modeled.

  • Multiplicity:- Multiplicity is the number of participating objects in the other class.

 Aggregation and Composition:-

These are speciatlization of association. They show that an object consists of other objects or contains other objects. The relationship can be described with “consists of” or “is part of”. Aggregation and Composition are displayed as aline between two classes that is labled with a small rhombus. Composistion is a specialization of aggregation. It meads that the contained object cannot exist without the aggregate. Therefore the cardinality of the aggregate can only be exactly one. The parts are created either with, or after the aggregate, and they are distroyed either with or before the aggregate. Composistion is denoted by a filled-in rhombus.

 Generalization and Specialization:- Generalization and Specialization are always bidirectional. Generalization can be described with the words “is a special”. They are indicated by a triangular arrow.

 Object diagram:-

An Object diagram is a snapshot taken during program execution, which describes the instances of the calsses and the relationships between them. It is a variant of the class diagram and is only useful for representing a complex class diagram.

 Sequence diagram:-

It display certain processes or situations. It focus on the time sequence of the behavior:

  • Creating and deleting objects

  • Exchanging messages between objects

An ‘X’ marks the end of the lifeline. The control focus shows the objects active period:

  • An object is active when actions are executed

  • An object is indirectly active if it is waiting for a subordinate procedure to end

Delegation Principle in a Sequence Diagram:-

In delegation, two objects are involved in handling a request. The recipient of the request passes on the execution of the request to a delegate.