The operation contract is used to define the system behavior, and the behavior of the system is described in detail according to the change of the object state in domain model;
A use case is a model that describes the behavior of a system, but if the use case is not clearly described, it is supplemented in the Operation contract.
Typically a use case has multiple operations, and an operation requires an action contract, such as:
There are several right-pointing arrows in the SSD that require several operations contracts.
Do not need to write a contract for each operation, only need to be able to change the state or not clear the operation can be written;
Operation contract Templates
Operation:name Cross
Reference: The name of the use case for this operation
precondition: The state of the object of the domain model before performing this operation
postcondition: Change
in Object state Postcondition can be written in:
(1) Creation of instances,
(2) Formation of associations,
(3) modification of attributes;