Logical View  «Prev 

UML Operation Modeling

  1. The behavior of a class is represented by its operations
  2. Operations may be found by examining interaction diagrams
Classes are drawn as rectangles. Lists of attributes and operations are shown in separate compartments. The compartments can be suppressed when full detail is not needed. A class may appear on several diagrams. The attributes and operations are often shown on one diagram and suppressed on other diagrams. Relationships among classes are drawn as paths connecting class rectangles. The different kinds of relationships are distinguished by line texture and by adornments on the paths or their ends.

Total Order Amount - Modeling Operations

1) Name the operation
1. Name the operation

2) Identify the input arguments.
2. Identify the input arguments. All of the input information is on the Order object, so an instance of Order is the only argument. Name the argument, the data type, and use a colon to a separate the two.

3) Define the return data type
3. Define the return data type. The data must be returned as a dollar amount, simply a number with two decimal positions.

4) Identify and describe any constraints.
4. Identify and describe any constraints. We know the rules for computing the total amount, but the notation does not provide a specification language for this computation.

5) Set the visibility of the operation.
5. Set the visibility of the operation. We know the rules for computing the total amount, but the notation does not provide a specification language for this computation.We can use the all-purpose constraint notation() to hold the text describing the computation.