A.2 Class Relationships


 
Building Parsers with Java
By Steven  John  Metsker

Table of Contents
Appendix  A.   UML Twice Distilled

    Content

Figure A.2 shows a few of the UML's features for modeling class relationships.

Figure A.2. Class relations. Various lines between classes indicate relationships between objects of the classes.

graphics/afig02.gif

In Figure A.2, note the following.

  • A diagram may show a class name or method name in italics to indicate that the class or method is abstract.

  • A large, open arrowhead points to a class's superclass.

  • A line between classes indicates that instances of the classes are connected in some way. Most commonly, a line on a class diagram means that one class has an instance variable that refers to the other class. The classes Alternation and Sequence , for example, use a Vector variable that CollectionParser declares to hold collections of other parsers.

  • An asterisk ( * ) indicates that zero or more instances of an object of a class may be connected to objects of an associated class. For example, a Sequence object has a reference to zero or more Parser objects.

  • A multiplicity indicator, such as 0..1 , indicates how many connections may appear between objects. For example, a Parser object can have zero or one associated Assembler objects.


   
Top


Building Parsers with Java
Building Parsers With Javaв„ў
ISBN: 0201719622
EAN: 2147483647
Year: 2000
Pages: 169

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net