Introduccion uml

Páginas: 8 (1905 palabras) Publicado: 3 de febrero de 2012
UML Newbie Guide


UML is a modelling language to specify, visualize, construct and document software systems. UML contains a number of modeling graphical “tools”, among them:
- Use case diagram for organizing and modeling behavior of the system
- Interaction diagram for interaction, consisting of a set of objects and their relationships, including the messages that may be dispatched amongthem. Interaction diagrams address the dynamic view of a system
- Statechart diagram for state machines, consisting of states, transitions, events and activities. Statechart diagrams address the dynamic view of a system.
- Class diagram for classes and their relationships. These diagrams are the most common in modeling object-oriented systems. Class diagrams address the static process view ofa system.

This paper introduces UML and its notations used for static structure, class diagrams and their relationships.

The “bible” for UML is The Unified Modeling Language User Guide” written of the original “inventors” of UML, Grady Booch, James Rumbaugh and Ivar Jacobson, ISBN number 0-201-57168-4.

Class Diagrams in UML

Class diagrams describe classes and different kinds ofstatic relationships: associations, aggregation, inheritance , interface.
[pic]
The class diagram is represented as a rectangle with three compartments, showing the class name, attributes and functions respectively. Though, any information deemed irrelevant to the application at hand may be omitted from a UML diagram. A class may be represented by two compartments, if attributes ar not important,or even with onr compartment, if just the name of the class is useful. Not all features have to be shown, if some are omitted, an ellips (…) is used.
Static declaration is underlined.
The visibility indicators are
+ for public access,
- for private access and
# for protected access.
Operations are represented using syntax different from C++/Java/C# and have the following syntax/form:():

The corresponding notation in C++, Java and C# are representented by the following classdeclarations:

C++:
class MyClass
{
public:
void setPrivateVar(int PrivateV) {privateVar = privateV;}
int getPrivateVar() {return PrivateVar;}
private:
int privateVar;
static int staticVar;
}

Java:
public class MyClass
{
public void setPrivateVar(int PrivateV){privateVar = privateV;}
public int getPrivateVar() {return PrivateVar;}
private int privateVar;
static int staticVar;
}

C#:
public class MyClass
{
public void setPrivateVar(int PrivateV) {privateVar = privateV;}
public int getPrivateVar() {return PrivateVar;}
private int privateVar;
static int staticVar;
}

Relationships in UML

There are different kinds of staticrelationships in UML:

Inheritance – Specialization/Generalization
Association
Aggregation
Dependency
Interface/Realization

- Inheritance is a specialization/generalization relationship between objects of the specialized elements (child) and objects of the generalized elements (parent).
- Association is a structural relationship that describes links or connection between objects.
-Aggregation is a special kind of association.
- Dependency is a weaker form of association and is a semantic relationship between objects in which a change in one object (independent) object may affect the semantics of the other (dependent) object. The independent class gain access to the dependent class through a parameter of one of its member functions.
- Interface/Realization is a semanticrelationship that is encountered between interfaces and the classes or components that realize them and between use cases and the collaboration that realize them.




Comments


Comments can be added to UML diagrams, using rectangles with their upper-right corner turned down. Each comment is attached by a dashed line to the appropriate element of the diagram.
[pic]


Inheritance -...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Introducción a UML
  • UML introduccion
  • Introducción a UML
  • Introduccion uml
  • Introduccion a uml
  • Uml introduccion
  • Introducción a uml
  • Introduccion a UML

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS