170 likes | 179 Views
Explore UML concepts including classes, interfaces, collaborations, use cases, active classes, components, nodes, interactions, state machines, packages, and annotations. Understand UML relationships of dependency, association, generalization, and realization. Learn about tag parsing and its application in UML models.
E N D
Lecture 5 UML & Tag parser A model is simplification of reality Grady Booch
UML Things Nouns Explanatory Structural things Behavioral things Grouping things Annotational things Verbs Organizational Logical Physical
Structural logical things Class Description of a set of objects that share the same attributes operations, relationships and semantics. A class implements one or more interfaces. + public - private Class is used in class diagrams, which are handy during modeling phase
Structural logical things Interface Collection of operations that specify a service of class or component. An interface describes externally visible behavior of an element. An interface may represent complete behavior of a class or component or only part of it. Interfaces defines a set of operation specifications (signatures) but never a set of operation implementations. In addition to class diagrams Interfaces are used in Component diagrams which are used for physical modeling of dependencies between components.
Structural logical things Collaboration Defines an interaction that captures some cooperative behavior. Any class can participate in many collaborations. Collaborations represent the implementation of patterns that make up the system. Essentially, think of collaborations as Design Patterns. Use case Description of set of sequences of actions that a system performs that yields an observable result of value to a particular actor. Use case is used to structure the behavioral things in a model. A use case is realized by collaboration. Active class Class whose objects own one or more processes or threads and, therefore can initiate control activity. An active class is just like a class except that its objects represent elements whose behavior is concurrent with other elements.
Structural physical things Component Is a physical and replaceable part of a system that provides realization of a set of interfaces. For example, Java Beans and ActiveX controls are examples of such components. Components represent physical packaging of logical elements such as classes, interfaces and collaborations. Node Physical element that exists at run time and represents computational resource, generally having at least some memory and, often, processing capability. A set of components may reside on a node and can migrate from node to node. Node
Behavioral things Dynamic parts of UML models Interaction Behavior that comprises set of messages exchanged among a set of objects within particular context to accomplish specific purposes. Interaction involves a number of elements such as messages, action sequences. State machine Behavior that specifies the sequences of states an object or interaction goes through during its lifetime in response to events. The behavior of individual class or classes maybe captured by state machine. State machine consists of states, transitions and events. Reading token
Grouping things Organizational parts of UML models Packages General-purpose mechanism for organizing elements into groups. Structural things, behavioral things and grouping things maybe placed in the package. Unlike components, packages are purely conceptual.
Annotational things Explanatory parts of UML models Note Symbol for rendering constraints and comments attached to an element. Just a note! Contains some important information
Relationships in UML Dependency Semantic relationship between two things in which change in one thing may affect the semantics of the other thing. Simply think of this as a dependency between a class and parameter to one of its methods
Relationships in UML Association Structural relationship that describes a set of links, connections between objects. Aggregation is a special kind of association relationship; it is a relationship between a whole and its part. May contain by reference or by value. Usually contains by value when come to existence and go away together.
Relationships in UML Generalization Specialization/generalization relationship in which objects of the specialized element (the child) are substitutable for objects of the generalized element (the parent). Child shares structure and and interface with parent. This is essentially an inheritance relationship.
Relationships in UML Realization Semantic relationship between classifiers. One classifier specifies the contract, the other guarantees to carry it out. Realization relationships can be encountered between interfaces and classes or components or between use cases and collaborations that realize them
Attribute name Tag name Attribute value <ENTITY NAME=“entity1” TYPE=“Predator”> <PROPERTY COLOR=“Blue”> <PROPERTY GENE=“atgcgttta”> </ENTITY> Child tag
Please visit UML center @ Rational corporation