What UML- operating contract is?

1, an example

Find:

1 ), the operation is also part of the contract case model.
2), SSD + text + Example contract with the operator domain model ---- "

2, the definition of

1), which part of the contract?

Operation: The name and parameters of the operation (the system is in operation SSD) 
CROSS-REFERENCE: EXAMPLE transmitted with this operation 
Preconditions: before performing the operation of the system or the object domain model state important assumptions. For example: Order end state can not be modified. 
Postcondition: the most important part. After completion of the operation, the object model field state . Follow-up will be discussed in detail.

2) What is the operating system?

SSD is in operation name (corresponding to a class method), thereby defining the operation contract.

3), Kisaki置 conditions

  • Definition: the changes in the field of object state model. The state change comprises:
A, create or delete instance 
B, a change attribute value 
C, formation or elimination association (association domain model)
  • How post-conditions associated with the domain model?
What examples can be created? (From the domain model) 
What association can be formed? (From the domain model) 
attribute values change? (From the domain model)
  • How to write a post-conditions?
A, in the past tense. 
    Preferably: XXX created 
    poor: Create XXX XXX is created or 
B, postcondition necessarily perfect, only to lightweight Analysis

It can be seen, the post-operation condition is the focus of the contract, it comes from the domain model.

 

Guess you like

Origin www.cnblogs.com/yaoyuan2/p/10988163.html