Object Oriented Software Engineering   View all facts   Glossary   Help
subject > programming language construct > statement > OCL statement
Next statementpostcondition    Upstatement    Previous statementloop   

OCL statement comparison table
Subject use state use for consist of have example specify be execute is a subtopic of is a kind of navigate from refer to write on compile
OCL statement in a class diagramthe implies operator which is true if either the left hand side is false or if both sizes are truethe preconditions and postconditions of operationsautomatic code generation
  • References to role names, association names, attributes and the results of operations.
  • The logical values true and false
  • Logical operators such as and, or, =, >, < or <> (not equals)
  • String values such as: 'a string'
  • Integers and real numbers (the latter having a decimal point)
  • Arithmetic operations *, /, +, -
{startPoint <> endPoint} constrains the two ends of a LineSegment to be differentwhat the values of attributes and associations must benot more than one line long if possible 5.6 - More Advanced Features of Class DiagramsOCL statementclass to class using a dot to separate components. For example, in LinearShape, to refer to the length of the edges you can refer to edge.length.special OCL properties of a collection itself using the -> operatora UML diagram but can be written separately with a context specified 

Next statementpostcondition    Upstatement    Previous statementloop