Unformatted text preview:

www.essaim.univ-mulhouse.frUML Notation Guide v1.0 Chapter 4UML Notation GuideChapter 44. STATIC STRUCTURE DIAGRAMS4.1 Class diagram4.2 Object diagram4.3 Class4.4 Name Compartment4.5 List Compartment4.6 Type4.7 Interfaces4.8 Parameterized Class (Template)4.9 Bound Element4.10 Utility4.11 Metaclass4.12 Class Pathnames4.13 Importing a package4.14 Attribute4.15 Operation4.16 Association4.17 Binary Association4.18 Association Role4.19 Multiplicity4.20 Qualifier4.21 Association Class4.22 N-ary association4.23 Composition4.24 Generalization4.25 Dependency 554.26 Refinement Relationship4.27 Derived Element4.28 Navigation ExpressionUML Notation Guide v1.0 Chapter 4http://www.essaim.univ-mulhouse.fr/uml/documentation/version1.0/notation/notation_guide_ch4.html (1 of 35) [09/09/2000 12:58:31 PM]4. STATIC STRUCTURE DIAGRAMSClass diagrams show the static structure of the model, in particular, the things that exist (such asclasses and types), their internal structure, and their relationships to other things. Class diagrams donot show temporal information, although they may contain reified occurrences of things that have orthings that describe temporal behavior. An object diagram shows instances compatible with aparticular class diagram.This chapter includes classes and their variations, including templates and instantiated classes, and therelationships between classes: association and generalization. It includes the contents of classes:attributes and operations. It also includes the organizational unit of class diagrams: packages.4.1 Class diagramA class diagram is a graph of modeling elements shown on a two-dimensional surface. (Note that a''class'' diagram may also contain types, packages, relationships, and even instances, such as objectsand links. Perhaps a better name would be ''static structural diagram'' but ''class diagram'' soundsbetter.)4.1.1 NotationA class diagram is a collection of (static) declarative model elements, such as classes, types, and theirrelationships, connected as a graph to each other and to their contents. Class diagrams may beorganized into packages either with their underlying models or as separate packages that build uponthe underlying model packages.4.2 Object diagramAn object diagram is a graph of instances. A static object diagram is an instance of a class diagram; itshows a snapshot of the detailed state of a system at a point in time. A dynamic object diagram showsthe detailed state of a system over some period of time, including the changes that occur over time;dynamic object diagrams are manifested as collaboration diagrams.There is no need for tools to support a separate format for object diagrams. Class diagrams can containobjects, so a class diagram with objects and no classes is an ''object diagram.'' Collaboration diagramscontain objects, so a collaboration diagram with no messages is an ''object diagram.'' The phrase isuseful, however, to characterize a particular usage achievable in various ways.4.3 ClassA class is the descriptor for a set of objects with similar structure, behavior, and relationships. UMLprovides notation for declaring classes and specifying their properties, as well as using classes invarious ways. Some modeling elements that are similar in form to classes (such as types, signals, orutilities) are notated as stereotypes of classes. Classes are declared in class diagrams and used in mostother diagrams. UML provides a graphical notation for declaring and using classes, as well as a textualnotation for referencing classes within the descriptions of other model elements.UML Notation Guide v1.0 Chapter 4http://www.essaim.univ-mulhouse.fr/uml/documentation/version1.0/notation/notation_guide_ch4.html (2 of 35) [09/09/2000 12:58:31 PM]4.3.1 SemanticsThe name of a class has scope within the package in which it is declared and the name must be unique(among class names) within its package.4.3.2 Basic notationA class is drawn as a solid-outline rectangle with 3 compartments separated by horizontal lines. Thetop name compartment holds the class name and other general properties of the class (includingstereotype); the middle list compartment holds a list of attributes; the bottom list compartment holds alist of operations.References. By default a class shown within a package is assumed to be defined within that package.To show a reference to a class defined in another package, use the syntaxPackage-name::Class-nameas the name string in the name compartment. A full pathname can be specified by chaining togetherpackage names separated by double colons (::).4.3.3 Presentation optionsEither or both of the attribute and operation compartments may be suppressed. A separator line is notdrawn for a missing compartment. If a compartment is suppressed, no inference can be drawn aboutthe presence or absence of elements in it.Additional compartments may be supplied as a tool extension to show other predefined or user-definedmodel properties, for example, to show business rules, responsibilities, variations, events handled, andso on. Most compartments are simply lists of strings. More complicated formats are possible, but UMLdoes not specify such formats; they are a tool responsibility. Appearance of each compartment shouldpreferably be implicit based on its contents. Tools may provide explicit markers if needed.Tools may provide other ways to show class references and to distinguish them from classdeclarations.A class symbol with a stereotype icon may be ''collapsed'' to show just the stereotype icon, with thename of the class either inside the class or below the icon. Other contents of the class are suppressed.4.3.4 Style guidelinesClass name in boldface, centered.Stereotype name in plain face, within guillemets, centered.Typically class names begin with an uppercase letter.Attributes and operations in plain face, left justified.Typically attribute and operation names begin with a lowercase letter.UML Notation Guide v1.0 Chapter 4http://www.essaim.univ-mulhouse.fr/uml/documentation/version1.0/notation/notation_guide_ch4.html (3 of 35) [09/09/2000 12:58:31 PM]As a tool extension, boldface may be used for marking special list elements, for example, to designatecandidate keys in a database design. This might encode some design property modeled as a taggedvalue, for example.Strings for the names of abstract classes or the signatures of abstract operations in italics.Show full attributes and operations when needed and suppress them in other contexts or


View Full Document

CORNELL CS 211 - Study Notes

Documents in this Course
B-Trees

B-Trees

10 pages

Hashing

Hashing

3 pages

Load more
Download Study Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Study Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?